From 44487946489298902fc9d15ded31e24d19171a6f Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Wed, 19 Aug 2020 15:30:09 -0700 Subject: [PATCH 01/42] fix(appsync): add dependency between apikey and schema (#9737) Added dependency between the CfnApiKey and CfnSchema. The dependency here is to prevent a `ConcurrencyModificationError` as seen in #8168. We allow this dependency to exist because from referencing the [docs](https://docs.aws.amazon.com/appsync/latest/APIReference/API_CreateApiKey.html#API_CreateApiKey_Errors) there shouldn't be any issue between creating an api key before or after schema creation. Also make ApiKeyConfig correctly configure the ApiKey when used in `additionalAuthorizationModes`. Fixes #9736 Fixes #8168 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 115 ++++++----------- .../aws-appsync/test/appsync-apikey.test.ts | 121 ++++++++++++++++++ .../test/integ.api-import.expected.json | 18 +-- .../test/integ.graphql-schema.expected.json | 18 +-- .../test/integ.graphql.expected.json | 18 +-- 5 files changed, 190 insertions(+), 100 deletions(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index f1a6ea42cc73c..7e6961627eda3 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -397,21 +397,21 @@ export class GraphQLApi extends GraphqlApiBase { /** * the configured API key, if present + * + * @default - no api key */ - public get apiKey(): string | undefined { - return this._apiKey; - } + public readonly apiKey?: string; private schemaMode: SchemaDefinition; private api: CfnGraphQLApi; - private _apiKey?: string; + private _apiKey?: CfnApiKey; constructor(scope: Construct, id: string, props: GraphQLApiProps) { super(scope, id); this.validateAuthorizationProps(props); const defaultAuthorizationType = - props.authorizationConfig?.defaultAuthorization?.authorizationType || + props.authorizationConfig?.defaultAuthorization?.authorizationType ?? AuthorizationType.API_KEY; let apiLogsRole; @@ -462,22 +462,24 @@ export class GraphQLApi extends GraphqlApiBase { this.graphQlUrl = this.api.attrGraphQlUrl; this.name = this.api.name; this.schemaMode = props.schemaDefinition; + this.schema = this.defineSchema(props.schemaDefinitionFile); - if ( - defaultAuthorizationType === AuthorizationType.API_KEY || + if (defaultAuthorizationType === AuthorizationType.API_KEY || props.authorizationConfig?.additionalAuthorizationModes?.some( - (authMode) => authMode.authorizationType === AuthorizationType.API_KEY - ) + (authMode) => authMode.authorizationType === AuthorizationType.API_KEY) ) { - const apiKeyConfig: ApiKeyConfig = props.authorizationConfig - ?.defaultAuthorization?.apiKeyConfig || { - name: 'DefaultAPIKey', - description: 'Default API Key created by CDK', - }; + // create a variable for apiKeyConfig if one has been specified by the user + // first check is for default authorization + // second check is for additional authorization modes + const apiKeyConfig = props.authorizationConfig?.defaultAuthorization?.apiKeyConfig ?? + props.authorizationConfig?.additionalAuthorizationModes?. + find((mode: AuthorizationMode) => { + return mode.authorizationType === AuthorizationType.API_KEY && mode.apiKeyConfig; + })?.apiKeyConfig; this._apiKey = this.createAPIKey(apiKeyConfig); + this._apiKey.addDependsOn(this.schema); + this.apiKey = this._apiKey.attrApiKey; } - - this.schema = this.defineSchema(props.schemaDefinitionFile); } /** @@ -531,65 +533,27 @@ export class GraphQLApi extends GraphqlApiBase { } private validateAuthorizationProps(props: GraphQLApiProps) { - const defaultAuthorizationType = - props.authorizationConfig?.defaultAuthorization?.authorizationType || - AuthorizationType.API_KEY; + const defaultMode = props.authorizationConfig?.defaultAuthorization ?? { + authorizationType: AuthorizationType.API_KEY, + }; + const additionalModes = props.authorizationConfig?.additionalAuthorizationModes ?? []; + const allModes = [defaultMode, ...additionalModes]; - if ( - defaultAuthorizationType === AuthorizationType.OIDC && - !props.authorizationConfig?.defaultAuthorization?.openIdConnectConfig - ) { - throw new Error('Missing default OIDC Configuration'); - } + allModes.map((mode) => { + if(mode.authorizationType === AuthorizationType.OIDC && !mode.openIdConnectConfig){ + throw new Error('Missing default OIDC Configuration'); + } + if(mode.authorizationType === AuthorizationType.USER_POOL && !mode.userPoolConfig){ + throw new Error('Missing default OIDC Configuration'); + } + }); - if ( - defaultAuthorizationType === AuthorizationType.USER_POOL && - !props.authorizationConfig?.defaultAuthorization?.userPoolConfig - ) { - throw new Error('Missing default User Pool Configuration'); + if(allModes.filter((mode) => mode.authorizationType === AuthorizationType.API_KEY).length > 1){ + throw new Error('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } - if (props.authorizationConfig?.additionalAuthorizationModes) { - props.authorizationConfig.additionalAuthorizationModes.forEach( - (authorizationMode) => { - if ( - authorizationMode.authorizationType === AuthorizationType.API_KEY && - defaultAuthorizationType === AuthorizationType.API_KEY - ) { - throw new Error( - "You can't duplicate API_KEY in additional authorization config. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html", - ); - } - - if ( - authorizationMode.authorizationType === AuthorizationType.IAM && - defaultAuthorizationType === AuthorizationType.IAM - ) { - throw new Error( - "You can't duplicate IAM in additional authorization config. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html", - ); - } - - if ( - authorizationMode.authorizationType === AuthorizationType.OIDC && - !authorizationMode.openIdConnectConfig - ) { - throw new Error( - 'Missing OIDC Configuration inside an additional authorization mode', - ); - } - - if ( - authorizationMode.authorizationType === - AuthorizationType.USER_POOL && - !authorizationMode.userPoolConfig - ) { - throw new Error( - 'Missing User Pool Configuration inside an additional authorization mode', - ); - } - }, - ); + if(allModes.filter((mode) => mode.authorizationType === AuthorizationType.IAM).length > 1){ + throw new Error('You can\'t duplicate IAM configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } } @@ -625,9 +589,9 @@ export class GraphQLApi extends GraphqlApiBase { }; } - private createAPIKey(config: ApiKeyConfig) { + private createAPIKey(config?: ApiKeyConfig) { let expires: number | undefined; - if (config.expires) { + if (config?.expires) { expires = new Date(config.expires).valueOf(); const days = (d: number) => Date.now() + Duration.days(d).toMilliseconds(); @@ -636,12 +600,11 @@ export class GraphQLApi extends GraphqlApiBase { } expires = Math.round(expires / 1000); } - const key = new CfnApiKey(this, `${config.name || 'DefaultAPIKey'}ApiKey`, { + return new CfnApiKey(this, `${config?.name || 'Default'}ApiKey`, { expires, - description: config.description || 'Default API Key created by CDK', + description: config?.description, apiId: this.apiId, }); - return key.attrApiKey; } private formatAdditionalAuthorizationModes( diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts index 9f47904770fcb..0edba3c360ac9 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts @@ -1,5 +1,6 @@ import '@aws-cdk/assert/jest'; import * as path from 'path'; +import * as cognito from '@aws-cdk/aws-cognito'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; @@ -82,4 +83,124 @@ describe('AppSync Authorization Config', () => { // THEN expect(stack).not.toHaveResource('AWS::AppSync::ApiKey'); }); + + test('appsync creates configured api key with additionalAuthorizationModes', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.IAM, + }, + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.API_KEY, + apiKeyConfig: { + description: 'Custom Description', + }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { + Description: 'Custom Description', + }); + }); + + test('appsync creates configured api key with additionalAuthorizationModes (not as first element)', () => { + // GIVEN + const stack = new cdk.Stack(); + const userPool = new cognito.UserPool(stack, 'myPool'); + + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.IAM, + }, + additionalAuthorizationModes: [ + { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { + userPool, + }, + }, + { + authorizationType: appsync.AuthorizationType.API_KEY, + apiKeyConfig: { + description: 'Custom Description', + }, + }, + ], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { + Description: 'Custom Description', + }); + }); + + test('appsync fails when multiple API_KEY auth modes', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const when = () => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.API_KEY, + }, + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.API_KEY, + }], + }, + }); + }; + + // THEN + expect(when).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); + + test('appsync fails when multiple API_KEY auth modes in additionalXxx', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + const when = () => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.IAM, + }, + additionalAuthorizationModes: [ + { + authorizationType: appsync.AuthorizationType.API_KEY, + }, + { + authorizationType: appsync.AuthorizationType.API_KEY, + }, + ], + }, + }); + }; + + // THEN + expect(when).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json index 3a0b9a76b760c..1398b9cbf5382 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.expected.json @@ -8,8 +8,8 @@ "Name": "baseApi" } }, - "baseApiDefaultAPIKeyApiKey4804ACE5": { - "Type": "AWS::AppSync::ApiKey", + "baseApiSchemaB12C7BB0": { + "Type": "AWS::AppSync::GraphQLSchema", "Properties": { "ApiId": { "Fn::GetAtt": [ @@ -17,20 +17,22 @@ "ApiId" ] }, - "Description": "Default API Key created by CDK" + "Definition": "type test {\n version: String!\n}\n\ntype Query {\n getTests: [ test! ]!\n}\n\ntype Mutation {\n addTest(version: String!): test\n}\n" } }, - "baseApiSchemaB12C7BB0": { - "Type": "AWS::AppSync::GraphQLSchema", + "baseApiDefaultApiKeyA3A0A16A": { + "Type": "AWS::AppSync::ApiKey", "Properties": { "ApiId": { "Fn::GetAtt": [ "baseApiCDA4D43A", "ApiId" ] - }, - "Definition": "type test {\n version: String!\n}\n\ntype Query {\n getTests: [ test! ]!\n}\n\ntype Mutation {\n addTest(version: String!): test\n}\n" - } + } + }, + "DependsOn": [ + "baseApiSchemaB12C7BB0" + ] } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json index 911fb65da3e0d..4527fed9237fd 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json @@ -7,8 +7,8 @@ "Name": "api" } }, - "codefirstapiDefaultAPIKeyApiKeyB73DF94B": { - "Type": "AWS::AppSync::ApiKey", + "codefirstapiSchema148B6CDE": { + "Type": "AWS::AppSync::GraphQLSchema", "Properties": { "ApiId": { "Fn::GetAtt": [ @@ -16,20 +16,22 @@ "ApiId" ] }, - "Description": "Default API Key created by CDK" + "Definition": "type Planet {\n name: String\n diameter: Int\n rotationPeriod: Int\n orbitalPeriod: Int\n gravity: String\n population: [String]\n climates: [String]\n terrains: [String]\n surfaceWater: Float\n created: String\n edited: String\n id: ID!\n}\ntype Species {\n name: String\n classification: String\n designation: String\n averageHeight: Float\n averageLifespan: Int\n eyeColors: [String]\n hairColors: [String]\n skinColors: [String]\n language: String\n homeworld: Planet\n created: String\n edited: String\n id: ID!\n}\n\ntype Query {\n getPlanets: [Planet]\n}\n" } }, - "codefirstapiSchema148B6CDE": { - "Type": "AWS::AppSync::GraphQLSchema", + "codefirstapiDefaultApiKey89863A80": { + "Type": "AWS::AppSync::ApiKey", "Properties": { "ApiId": { "Fn::GetAtt": [ "codefirstapi1A3CC7D2", "ApiId" ] - }, - "Definition": "type Planet {\n name: String\n diameter: Int\n rotationPeriod: Int\n orbitalPeriod: Int\n gravity: String\n population: [String]\n climates: [String]\n terrains: [String]\n surfaceWater: Float\n created: String\n edited: String\n id: ID!\n}\ntype Species {\n name: String\n classification: String\n designation: String\n averageHeight: Float\n averageLifespan: Int\n eyeColors: [String]\n hairColors: [String]\n skinColors: [String]\n language: String\n homeworld: Planet\n created: String\n edited: String\n id: ID!\n}\n\ntype Query {\n getPlanets: [Planet]\n}\n" - } + } + }, + "DependsOn": [ + "codefirstapiSchema148B6CDE" + ] }, "codefirstapiplanetsServiceRole2F4AA8E7": { "Type": "AWS::IAM::Role", diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json index 0406904978e66..e5eed82bd5992 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.expected.json @@ -51,8 +51,8 @@ } } }, - "ApiDefaultAPIKeyApiKey74F5313B": { - "Type": "AWS::AppSync::ApiKey", + "ApiSchema510EECD7": { + "Type": "AWS::AppSync::GraphQLSchema", "Properties": { "ApiId": { "Fn::GetAtt": [ @@ -60,20 +60,22 @@ "ApiId" ] }, - "Description": "Default API Key created by CDK" + "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" } }, - "ApiSchema510EECD7": { - "Type": "AWS::AppSync::GraphQLSchema", + "ApiDefaultApiKeyF991C37B": { + "Type": "AWS::AppSync::ApiKey", "Properties": { "ApiId": { "Fn::GetAtt": [ "ApiF70053CD", "ApiId" ] - }, - "Definition": "type ServiceVersion @aws_api_key {\n version: String!\n}\n\ntype Customer @aws_api_key {\n id: String!\n name: String!\n}\n\ninput SaveCustomerInput {\n name: String!\n}\n\ntype Order @aws_api_key {\n customer: String!\n order: String!\n}\n\ntype Payment @aws_api_key {\n id: String!\n amount: String!\n}\n\ninput PaymentInput {\n amount: String!\n}\n\ntype Query @aws_api_key {\n getServiceVersion: ServiceVersion\n getCustomers: [Customer]\n getCustomer(id: String): Customer\n getCustomerOrdersEq(customer: String): Order\n getCustomerOrdersLt(customer: String): Order\n getCustomerOrdersLe(customer: String): Order\n getCustomerOrdersGt(customer: String): Order\n getCustomerOrdersGe(customer: String): Order\n getCustomerOrdersFilter(customer: String, order: String): Order\n getCustomerOrdersBetween(customer: String, order1: String, order2: String): Order\n getPayment(id: String): Payment\n}\n\ninput FirstOrderInput {\n product: String!\n quantity: Int!\n}\n\ntype Mutation @aws_api_key {\n addCustomer(customer: SaveCustomerInput!): Customer\n saveCustomer(id: String!, customer: SaveCustomerInput!): Customer\n removeCustomer(id: String!): Customer\n saveCustomerWithFirstOrder(customer: SaveCustomerInput!, order: FirstOrderInput!, referral: String): Order\n savePayment(payment: PaymentInput!): Payment\n doPostOnAws: String!\n}\n" - } + } + }, + "DependsOn": [ + "ApiSchema510EECD7" + ] }, "Apinone1F55F3F3": { "Type": "AWS::AppSync::DataSource", From 6fdba6ee729c1fe66e4d25b9907fdc77098600e3 Mon Sep 17 00:00:00 2001 From: Somaya Date: Wed, 19 Aug 2020 16:40:17 -0700 Subject: [PATCH 02/42] update ownership in auto label/assign action --- .github/workflows/issue-label-assign.yml | 72 ++++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/issue-label-assign.yml b/.github/workflows/issue-label-assign.yml index 3413d8ff579cf..67e411ca6f887 100644 --- a/.github/workflows/issue-label-assign.yml +++ b/.github/workflows/issue-label-assign.yml @@ -18,7 +18,7 @@ jobs: {"keywords":["[@aws-cdk/app-delivery]","[app-delivery]","[app delivery]"],"labels":["@aws-cdk/app-delivery"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/assert]","[assert]"],"labels":["@aws-cdk/assert"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/assets]","[assets]"],"labels":["@aws-cdk/assets"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-accessanalyzer]","[aws-accessanalyzer]","[accessanalyzer]","[access analyzer]"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-accessanalyzer]","[aws-accessanalyzer]","[accessanalyzer]","[access analyzer]"],"labels":["@aws-cdk/aws-accessanalyzer"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-acmpca]","[aws-acmpca]","[acmpca]"],"labels":["@aws-cdk/aws-acmpca"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/aws-amazonmq]","[aws-amazonmq]","[amazonmq]","[amazon mq]","[amazon-mq]"],"labels":["@aws-cdk/aws-amazonmq"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-amplify]","[aws-amplify]","[amplify]"],"labels":["@aws-cdk/aws-amplify"],"assignees":["MrArnoldPalmer"]}, @@ -26,7 +26,7 @@ jobs: {"keywords":["[@aws-cdk/aws-apigatewayv2]","[aws-apigatewayv2]","[apigatewayv2]","[apigateway v2]","[api-gateway-v2]"],"labels":["@aws-cdk/aws-apigatewayv2"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-appconfig]","[aws-appconfig]","[appconfig]","[app config]","[app-config]"],"labels":["@aws-cdk/aws-appconfig"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-applicationautoscaling]","[aws-applicationautoscaling]","[applicationautoscaling]","[application autoscaling]","[application-autoscaling]"],"labels":["@aws-cdk/aws-applicationautoscaling"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-appmesh]","[aws-appmesh]","[appmesh]","[app mesh]","[app-mesh]"],"labels":["@aws-cdk/aws-appmesh"],"assignees":["MrArnoldPalmer"]}, + {"keywords":["[@aws-cdk/aws-appmesh]","[aws-appmesh]","[appmesh]","[app mesh]","[app-mesh]"],"labels":["@aws-cdk/aws-appmesh"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/aws-appstream]","[aws-appstream]","[appstream]","[app stream]","[app-stream]"],"labels":["@aws-cdk/aws-appstream"],"assignees":["NetaNir"]}, {"keywords":["[@aws-cdk/aws-appsync]","[aws-appsync]","[appsync]","[app sync]","[app-sync]"],"labels":["@aws-cdk/aws-appsync"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-athena]","[aws-athena]","[athena]"],"labels":["@aws-cdk/aws-athena"],"assignees":["iliapolo"]}, @@ -46,7 +46,7 @@ jobs: {"keywords":["[@aws-cdk/aws-cloudformation]","[aws-cloudformation]","[cloudformation]","[cloud formation]"],"labels":["@aws-cdk/aws-cloudformation"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-cloudfront]","[aws-cloudfront]","[cloudfront]","[cloud front]"],"labels":["@aws-cdk/aws-cloudfront"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-cloudfront-origins]","[aws-cloudfront-origins]","[cloudfront-origins]","[cloudfront origins]"],"labels":["@aws-cdk/aws-cloudfront-origins"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-cloudtrail]","[aws-cloudtrail]","[cloudtrail]","[cloud trail]"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-cloudtrail]","[aws-cloudtrail]","[cloudtrail]","[cloud trail]"],"labels":["@aws-cdk/aws-cloudtrail"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-cloudwatch]","[aws-cloudwatch]","[cloudwatch]","[cloud watch]"],"labels":["@aws-cdk/aws-cloudwatch"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-cloudwatch-actions]","[aws-cloudwatch-actions]","[cloudwatch-actions]","[cloudwatch actions]"],"labels":["@aws-cdk/aws-cloudwatch-actions"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-codebuild]","[aws-codebuild]","[codebuild]","[code build]","[code-build]"],"labels":["@aws-cdk/aws-codebuild"],"assignees":["skinny85"]}, @@ -61,29 +61,29 @@ jobs: {"keywords":["[@aws-cdk/aws-cognito]","[aws-cognito]","[cognito]"],"labels":["@aws-cdk/aws-cognito"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-config]","[aws-config]","[config]"],"labels":["@aws-cdk/aws-config"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-datapipeline]","[aws-datapipeline]","[datapipeline]","[data pipeline]","[data-pipeline]"],"labels":["@aws-cdk/aws-datapipeline"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-dax]","[aws-dax]","[dax]"],"labels":["@aws-cdk/aws-dax"],"assignees":["RomainMuller"]}, - {"keywords":["[@aws-cdk/aws-detective]","[aws-detective]","[detective]"],"labels":["@aws-cdk/aws-detective"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-dax]","[aws-dax]","[dax]"],"labels":["@aws-cdk/aws-dax"],"assignees":["skinny85"]}, + {"keywords":["[@aws-cdk/aws-detective]","[aws-detective]","[detective]"],"labels":["@aws-cdk/aws-detective"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-directoryservice]","[aws-directoryservice]","[directoryservice]","[directory service]","[directory-service]"],"labels":["@aws-cdk/aws-directoryservice"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-dlm]","[aws-dlm]","[dlm]"],"labels":["@aws-cdk/aws-dlm"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-dms]","[aws-dms]","[dms]"],"labels":["@aws-cdk/aws-dms"],"assignees":["nija-at"]}, + {"keywords":["[@aws-cdk/aws-dlm]","[aws-dlm]","[dlm]"],"labels":["@aws-cdk/aws-dlm"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-dms]","[aws-dms]","[dms]"],"labels":["@aws-cdk/aws-dms"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-docdb]","[aws-docdb]","[docdb]","[doc db]","[doc-db]"],"labels":["@aws-cdk/aws-docdb"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-dynamodb]","[aws-dynamodb]","[dynamodb]","[dynamo db]","[dynamo-db]"],"labels":["@aws-cdk/aws-dynamodb"],"assignees":["RomainMuller"]}, - {"keywords":["[@aws-cdk/aws-dynamodb-global]","[aws-dynamodb-global]","[dynamodb-global]","[dynamodb global]"],"labels":["@aws-cdk/aws-dynamodb-global"],"assignees":["RomainMuller"]}, + {"keywords":["[@aws-cdk/aws-dynamodb]","[aws-dynamodb]","[dynamodb]","[dynamo db]","[dynamo-db]"],"labels":["@aws-cdk/aws-dynamodb"],"assignees":["skinny85"]}, + {"keywords":["[@aws-cdk/aws-dynamodb-global]","[aws-dynamodb-global]","[dynamodb-global]","[dynamodb global]"],"labels":["@aws-cdk/aws-dynamodb-global"],"assignees":["skinny85"]}, {"keywords":["[@aws-cdk/aws-ec2]","[aws-ec2]","[ec2]","[vpc]"],"labels":["@aws-cdk/aws-ec2"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-ecr]","[aws-ecr]","[ecr]"],"labels":["@aws-cdk/aws-ecr"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-ecr-assets]","[aws-ecr-assets]","[ecr-assets]","[ecr assets]","[ecrassets]"],"labels":["@aws-cdk/aws-ecr-assets"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-efs]","[aws-efs]","[efs]"],"labels":["@aws-cdk/aws-efs"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-efs]","[aws-efs]","[efs]"],"labels":["@aws-cdk/aws-efs"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-eks]","[aws-eks]","[eks]"],"labels":["@aws-cdk/aws-eks"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-elasticache]","[aws-elasticache]","[elasticache]","[elastic cache]","[elastic-cache]"],"labels":["@aws-cdk/aws-elasticache"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-elasticbeanstalk]","[aws-elasticbeanstalk]","[elasticbeanstalk]","[elastic beanstalk]","[elastic-beanstalk]"],"labels":["@aws-cdk/aws-elasticbeanstalk"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancing]","[aws-elasticloadbalancing]","[elasticloadbalancing]","[elastic loadbalancing]","[elastic-loadbalancing]","[elb]"],"labels":["@aws-cdk/aws-elasticloadbalancing"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2]","[aws-elasticloadbalancingv2]","[elasticloadbalancingv2]","[elastic-loadbalancing-v2]","[elbv2]","[elb v2]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2-targets]","[aws-elasticloadbalancingv2-targets]","[elasticloadbalancingv2-targets]","[elasticloadbalancingv2 targets]","[elbv2 targets]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2-targets"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-elasticloadbalancing]","[aws-elasticloadbalancing]","[elasticloadbalancing]","[elastic loadbalancing]","[elastic-loadbalancing]","[elb]"],"labels":["@aws-cdk/aws-elasticloadbalancing"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2]","[aws-elasticloadbalancingv2]","[elasticloadbalancingv2]","[elastic-loadbalancing-v2]","[elbv2]","[elb v2]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-elasticloadbalancingv2-targets]","[aws-elasticloadbalancingv2-targets]","[elasticloadbalancingv2-targets]","[elasticloadbalancingv2 targets]","[elbv2 targets]"],"labels":["@aws-cdk/aws-elasticloadbalancingv2-targets"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-elasticsearch]","[aws-elasticsearch]","[elasticsearch]","[elastic search]","[elastic-search]"],"labels":["@aws-cdk/aws-elasticsearch"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-emr]","[aws-emr]","[emr]"],"labels":["@aws-cdk/aws-emr"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-events]","[aws-events]","[events]","[eventbridge]","pevent-bridge]"],"labels":["@aws-cdk/aws-events"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-events-targets]","[aws-events-targets]","[events-targets]","[events targets]"],"labels":["@aws-cdk/aws-events-targets"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-eventschemas]","[aws-eventschemas]","[eventschemas]","[event schemas]"],"labels":["@aws-cdk/aws-eventschemas"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-events]","[aws-events]","[events]","[eventbridge]","event-bridge]"],"labels":["@aws-cdk/aws-events"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-events-targets]","[aws-events-targets]","[events-targets]","[events targets]"],"labels":["@aws-cdk/aws-events-targets"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-eventschemas]","[aws-eventschemas]","[eventschemas]","[event schemas]"],"labels":["@aws-cdk/aws-eventschemas"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-fms]","[aws-fms]","[fms]"],"labels":["@aws-cdk/aws-fms"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-fsx]","[aws-fsx]","[fsx]"],"labels":["@aws-cdk/aws-fsx"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-gamelift]","[aws-gamelift]","[gamelift]","[game lift]"],"labels":["@aws-cdk/aws-gamelift"],"assignees":["MrArnoldPalmer"]}, @@ -92,8 +92,8 @@ jobs: {"keywords":["[@aws-cdk/aws-greengrass]","[aws-greengrass]","[greengrass]","[green grass]","[green-grass]"],"labels":["@aws-cdk/aws-greengrass"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-guardduty]","[aws-guardduty]","[guardduty]","[guard duty]","[guard-duty]"],"labels":["@aws-cdk/aws-guardduty"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/aws-iam]","[aws-iam]","[iam]"],"labels":["@aws-cdk/aws-iam"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-imagebuilder]","[aws-imagebuilder]","[imagebuilder]","[image builder]","[image-builder]"],"labels":["@aws-cdk/aws-imagebuilder"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-inspector]","[aws-inspector]","[inspector]"],"labels":["@aws-cdk/aws-inspector"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-imagebuilder]","[aws-imagebuilder]","[imagebuilder]","[image builder]","[image-builder]"],"labels":["@aws-cdk/aws-imagebuilder"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-inspector]","[aws-inspector]","[inspector]"],"labels":["@aws-cdk/aws-inspector"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iot]","[aws-iot]","[iot]"],"labels":["@aws-cdk/aws-iot"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iot1click]","[aws-iot1click]","[iot1click]","[iot 1click]"],"labels":["@aws-cdk/aws-iot1click"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-iotanalytics]","[aws-iotanalytics]","[iotanalytics]","[iot analytics]","[iot-analytics]"],"labels":["@aws-cdk/aws-iotanalytics"],"assignees":["shivlaks"]}, @@ -108,26 +108,26 @@ jobs: {"keywords":["[@aws-cdk/aws-lambda-event-sources]","[aws-lambda-event-sources]","[lambda-event-sources]","[lambda event sources]"],"labels":["@aws-cdk/aws-lambda-event-sources"],"assignees":["nija-at"]}, {"keywords":["[@aws-cdk/aws-lambda-nodejs]","[aws-lambda-nodejs]","[lambda-nodejs]","[lambda nodejs]"],"labels":["@aws-cdk/aws-lambda-nodejs"],"assignees":["eladb"]}, {"keywords":["[@aws-cdk/aws-lambda-python]","[aws-lambda-python]","[lambda-python]","[lambda python]"],"labels":["@aws-cdk/aws-lambda-python"],"assignees":["eladb"]}, - {"keywords":["[@aws-cdk/aws-logs]","[aws-logs]","[logs]"],"labels":["@aws-cdk/aws-logs"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-logs-destinations]","[aws-logs-destinations]","[logs-destinations]","[logs destinations]"],"labels":["@aws-cdk/aws-logs-destinations"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-logs]","[aws-logs]","[logs]"],"labels":["@aws-cdk/aws-logs"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-logs-destinations]","[aws-logs-destinations]","[logs-destinations]","[logs destinations]"],"labels":["@aws-cdk/aws-logs-destinations"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-managedblockchain]","[aws-managedblockchain]","[managedblockchain]","[managed blockchain]","[managed-blockchain]"],"labels":["@aws-cdk/aws-managedblockchain"],"assignees":["shivlaks"]}, - {"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-mediaconvert]","[aws-mediaconvert]","[mediaconvert]","[media convert]","[media-convert]"],"labels":["@aws-cdk/aws-mediaconvert"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-medialive]","[aws-medialive]","[medialive]","[media live]","[media-live]"],"labels":["@aws-cdk/aws-medialive"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-mediastore]","[aws-mediastore]","[mediastore]","[media store]","[media-store]"],"labels":["@aws-cdk/aws-mediastore"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-msk]","[aws-msk]","[msk]"],"labels":["@aws-cdk/aws-msk"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-neptune]","[aws-neptune]","[neptune]"],"labels":["@aws-cdk/aws-neptune"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-networkmanager]","[aws-networkmanager]","[networkmanager]","[network manager]","[network-manager]"],"labels":["@aws-cdk/aws-networkmanager"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-opsworks]","[aws-opsworks]","[opsworks]","[ops works]","[ops-works]"],"labels":["@aws-cdk/aws-opsworks"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-opsworkscm]","[aws-opsworkscm]","[opsworkscm]","[opsworks cm]","[opsworks-cm]"],"labels":["@aws-cdk/aws-opsworkscm"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-personalize]","[aws-personalize]","[personalize]"],"labels":["@aws-cdk/aws-personalize"],"assignees":["NetaNir"]}, + {"keywords":["[@aws-cdk/aws-personalize]","[aws-personalize]","[personalize]"],"labels":["@aws-cdk/aws-personalize"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-pinpoint]","[aws-pinpoint]","[pinpoint]"],"labels":["@aws-cdk/aws-pinpoint"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-pinpointemail]","[aws-pinpointemail]","[pinpointemail]","[pinpoint email]","[pinpoint-email]"],"labels":["@aws-cdk/aws-pinpointemail"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-qldb]","[aws-qldb]","[qldb]"],"labels":["@aws-cdk/aws-qldb"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-ram]","[aws-ram]","[ram]"],"labels":["@aws-cdk/aws-ram"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-rds]","[aws-rds]","[rds]"],"labels":["@aws-cdk/aws-rds"],"assignees":["skinny85"]}, - {"keywords":["[@aws-cdk/aws-redshift]","[aws-redshift]","[redshift]","[red shift]","[red-shift]"],"labels":["@aws-cdk/aws-redshift"],"assignees":["nija-at"]}, + {"keywords":["[@aws-cdk/aws-redshift]","[aws-redshift]","[redshift]","[red shift]","[red-shift]"],"labels":["@aws-cdk/aws-redshift"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-resourcegroups]","[aws-resourcegroups]","[resourcegroups]","[resource groups]","[resource-groups]"],"labels":["@aws-cdk/aws-resourcegroups"],"assignees":["MrArnoldPalmer"]}, - {"keywords":["[@aws-cdk/aws-robomaker]","[aws-robomaker]","[robomaker]","[robo maker]","[robo-maker]"],"labels":["@aws-cdk/aws-robomaker"],"assignees":["NetaNir"]}, + {"keywords":["[@aws-cdk/aws-robomaker]","[aws-robomaker]","[robomaker]","[robo maker]","[robo-maker]"],"labels":["@aws-cdk/aws-robomaker"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-route53]","[aws-route53]","[route53]","[route 53]","[route-53]"],"labels":["@aws-cdk/aws-route53"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-route53-patterns]","[aws-route53-patterns]","[route53-patterns]","[route53 patterns]","[route-53-patterns]"],"labels":["@aws-cdk/aws-route53-patterns"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-route53-targets]","[aws-route53-targets]","[route53-targets]","[route53 targets]","[route-53-targets]"],"labels":["@aws-cdk/aws-route53-targets"],"assignees":["shivlaks"]}, @@ -136,11 +136,11 @@ jobs: {"keywords":["[@aws-cdk/aws-s3-assets]","[aws-s3-assets]","[s3-assets]","[s3 assets]"],"labels":["@aws-cdk/aws-s3-assets"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-s3-deployment]","[aws-s3-deployment]","[s3-deployment]","[s3 deployment]"],"labels":["@aws-cdk/aws-s3-deployment"],"assignees":["iliapolo"]}, {"keywords":["[@aws-cdk/aws-s3-notifications]","[aws-s3-notifications]","[s3-notifications]","[s3 notifications]"],"labels":["@aws-cdk/aws-s3-notifications"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-sagemaker]","[aws-sagemaker]","[sagemaker]","[sage maker]","[sage-maker]"],"labels":["@aws-cdk/aws-sagemaker"],"assignees":["NetaNir"]}, - {"keywords":["[@aws-cdk/aws-sam]","[aws-sam]","[sam]"],"labels":["@aws-cdk/aws-sam"],"assignees":["nija-at"]}, - {"keywords":["[@aws-cdk/aws-sdb]","[aws-sdb]","[sdb]"],"labels":["@aws-cdk/aws-sdb"],"assignees":["nija-at"]}, + {"keywords":["[@aws-cdk/aws-sagemaker]","[aws-sagemaker]","[sagemaker]","[sage maker]","[sage-maker]"],"labels":["@aws-cdk/aws-sagemaker"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-sam]","[aws-sam]","[sam]"],"labels":["@aws-cdk/aws-sam"],"assignees":["njlynch"]}, + {"keywords":["[@aws-cdk/aws-sdb]","[aws-sdb]","[sdb]"],"labels":["@aws-cdk/aws-sdb"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/aws-secretsmanager]","[aws-secretsmanager]","[secretsmanager]","[secrets manager]","[secrets-manager]"],"labels":["@aws-cdk/aws-secretsmanager"],"assignees":["njlynch"]}, - {"keywords":["[@aws-cdk/aws-securityhub]","[aws-securityhub]","[securityhub]","[security hub]","[security-hub]"],"labels":["@aws-cdk/aws-securityhub"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-securityhub]","[aws-securityhub]","[securityhub]","[security hub]","[security-hub]"],"labels":["@aws-cdk/aws-securityhub"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-servicecatalog]","[aws-servicecatalog]","[servicecatalog]","[service catalog]","[service-catalog]"],"labels":["@aws-cdk/aws-servicecatalog"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-servicediscovery]","[aws-servicediscovery]","[servicediscovery]","[service discovery]","[service-discovery]"],"labels":["@aws-cdk/aws-servicediscovery"],"assignees":["MrArnoldPalmer"]}, {"keywords":["[@aws-cdk/aws-ses]","[aws-ses]","[ses]"],"labels":["@aws-cdk/aws-ses"],"assignees":["iliapolo"]}, @@ -153,9 +153,9 @@ jobs: {"keywords":["[@aws-cdk/aws-stepfunctions-tasks]","[aws-stepfunctions-tasks]","[stepfunctions-tasks]","[stepfunctions tasks]"],"labels":["@aws-cdk/aws-stepfunctions-tasks"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-synthetics]","[aws-synthetics]","[synthetics]"],"labels":["@aws-cdk/aws-synthetics"],"assignees":["NetaNir"]}, {"keywords":["[@aws-cdk/aws-transfer]","[aws-transfer]","[transfer]"],"labels":["@aws-cdk/aws-transfer"],"assignees":["iliapolo"]}, - {"keywords":["[@aws-cdk/aws-waf]","[aws-waf]","[waf]"],"labels":["@aws-cdk/aws-waf"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-wafregional]","[aws-wafregional]","[wafregional]","[waf regional]","[waf-regional]"],"labels":["@aws-cdk/aws-wafregional"],"assignees":["rix0rrr"]}, - {"keywords":["[@aws-cdk/aws-wafv2]","[aws-wafv2]","[wafv2]","[waf v2]","[waf-v2]"],"labels":["@aws-cdk/aws-wafv2"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-waf]","[aws-waf]","[waf]"],"labels":["@aws-cdk/aws-waf"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-wafregional]","[aws-wafregional]","[wafregional]","[waf regional]","[waf-regional]"],"labels":["@aws-cdk/aws-wafregional"],"assignees":["shivlaks"]}, + {"keywords":["[@aws-cdk/aws-wafv2]","[aws-wafv2]","[wafv2]","[waf v2]","[waf-v2]"],"labels":["@aws-cdk/aws-wafv2"],"assignees":["shivlaks"]}, {"keywords":["[@aws-cdk/aws-workspaces]","[aws-workspaces]","[workspaces]"],"labels":["@aws-cdk/aws-workspaces"],"assignees":["NetaNir"]}, {"keywords":["[@aws-cdk/cfnspec]","[cfnspec]","[cfn spec]","[cfn-spec]"],"labels":["@aws-cdk/cfnspec"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/cloud-assembly-schema]","[cloud-assembly-schema]","[cloud assembly schema]"],"labels":["@aws-cdk/cloud-assembly-schema"],"assignees":["rix0rrr"]}, @@ -165,7 +165,7 @@ jobs: {"keywords":["[@aws-cdk/custom-resources]","[custom-resources]","[custom resources]"],"labels":["@aws-cdk/custom-resources"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/cx-api]","[cx-api]","[cx api]"],"labels":["@aws-cdk/cx-api"],"assignees":["rix0rrr"]}, {"keywords":["[@aws-cdk/region-info]","[region-info]","[region info]"],"labels":["@aws-cdk/region-info"],"assignees":["RomainMuller"]}, - {"keywords":["[@aws-cdk/aws-macie]","[aws-macie]","[macie]"],"labels":["@aws-cdk/aws-macie"],"assignees":["rix0rrr"]}, + {"keywords":["[@aws-cdk/aws-macie]","[aws-macie]","[macie]"],"labels":["@aws-cdk/aws-macie"],"assignees":["njlynch"]}, {"keywords":["[@aws-cdk/pipelines]","[pipelines]","[cdk pipelines]","[cdk-pipelines]"],"labels":["@aws-cdk/pipelines"],"assignees":["rix0rrr"]} ] From 9d76c267b4777852fcab797ee6f54880663f6569 Mon Sep 17 00:00:00 2001 From: Ben Munro Date: Thu, 20 Aug 2020 11:25:09 +0200 Subject: [PATCH 03/42] feat(region-info): add information for af-south-1 and eu-south-1 regions (#9569) CDK metadata is not supported in either region. ELV logging accounts were already present. ALIAS records to S3 Websites are not supported in eu-south-1. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../region-info/build-tools/aws-entities.ts | 2 + .../region-info/build-tools/fact-tables.ts | 3 ++ .../__snapshots__/region-info.test.js.snap | 40 +++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/packages/@aws-cdk/region-info/build-tools/aws-entities.ts b/packages/@aws-cdk/region-info/build-tools/aws-entities.ts index 18a351892e6ed..1588af66c6384 100644 --- a/packages/@aws-cdk/region-info/build-tools/aws-entities.ts +++ b/packages/@aws-cdk/region-info/build-tools/aws-entities.ts @@ -12,6 +12,7 @@ export const AWS_REGIONS = [ 'us-gov-west-1', 'us-iso-east-1', 'us-isob-east-1', + 'af-south-1', 'ap-east-1', 'ap-south-1', 'ap-northeast-2', @@ -26,6 +27,7 @@ export const AWS_REGIONS = [ 'eu-west-2', 'eu-west-3', 'eu-north-1', + 'eu-south-1', 'me-south-1', 'sa-east-1', ].sort(); 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 4e7ee6eee1261..7b474c6042723 100644 --- a/packages/@aws-cdk/region-info/build-tools/fact-tables.ts +++ b/packages/@aws-cdk/region-info/build-tools/fact-tables.ts @@ -18,6 +18,7 @@ export const AWS_CDK_METADATA = new Set([ // 'us-gov-west-1', // 'us-iso-east-1', // 'us-isob-east-1', + // 'af-south-1', 'ap-south-1', 'ap-east-1', // 'ap-northeast-3', @@ -33,6 +34,7 @@ export const AWS_CDK_METADATA = new Set([ 'eu-west-2', 'eu-west-3', 'eu-north-1', + // 'eu-south-1', 'me-south-1', 'sa-east-1', ]); @@ -49,6 +51,7 @@ export const ROUTE_53_BUCKET_WEBSITE_ZONE_IDS: { [region: string]: string } = { 'us-west-2': 'Z3BJ6K6RIION7M', 'us-gov-east-1': 'Z2NIFVYYW2VKV1', 'us-gov-west-1': 'Z31GFT0UA1I2HV', + 'af-south-1': 'Z11KHD8FBVPUYU', 'ap-east-1': 'ZNB98KWMFR0R6', 'ap-south-1': 'Z11RGJOFQNVJUP', 'ap-northeast-3': 'Z2YQB5RD63NC85', diff --git a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap index 48b108e2f7967..1ec9c0064af08 100644 --- a/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap +++ b/packages/@aws-cdk/region-info/test/__snapshots__/region-info.test.js.snap @@ -2,6 +2,26 @@ exports[`built-in data is correct 1`] = ` Object { + "af-south-1": Object { + "cdkMetadataResourceAvailable": false, + "domainSuffix": "amazonaws.com", + "partition": "aws", + "s3StaticWebsiteEndpoint": "s3-website.af-south-1.amazonaws.com", + "servicePrincipals": Object { + "application-autoscaling": "application-autoscaling.amazonaws.com", + "autoscaling": "autoscaling.amazonaws.com", + "codedeploy": "codedeploy.af-south-1.amazonaws.com", + "ec2": "ec2.amazonaws.com", + "events": "events.amazonaws.com", + "lambda": "lambda.amazonaws.com", + "logs": "logs.af-south-1.amazonaws.com", + "s3": "s3.amazonaws.com", + "sns": "sns.amazonaws.com", + "sqs": "sqs.amazonaws.com", + "states": "states.af-south-1.amazonaws.com", + }, + "vpcEndPointServiceNamePrefix": "com.amazonaws.vpce", + }, "ap-east-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", @@ -222,6 +242,26 @@ Object { }, "vpcEndPointServiceNamePrefix": "com.amazonaws.vpce", }, + "eu-south-1": Object { + "cdkMetadataResourceAvailable": false, + "domainSuffix": "amazonaws.com", + "partition": "aws", + "s3StaticWebsiteEndpoint": "s3-website.eu-south-1.amazonaws.com", + "servicePrincipals": Object { + "application-autoscaling": "application-autoscaling.amazonaws.com", + "autoscaling": "autoscaling.amazonaws.com", + "codedeploy": "codedeploy.eu-south-1.amazonaws.com", + "ec2": "ec2.amazonaws.com", + "events": "events.amazonaws.com", + "lambda": "lambda.amazonaws.com", + "logs": "logs.eu-south-1.amazonaws.com", + "s3": "s3.amazonaws.com", + "sns": "sns.amazonaws.com", + "sqs": "sqs.amazonaws.com", + "states": "states.eu-south-1.amazonaws.com", + }, + "vpcEndPointServiceNamePrefix": "com.amazonaws.vpce", + }, "eu-west-1": Object { "cdkMetadataResourceAvailable": true, "domainSuffix": "amazonaws.com", From ddd29b485d5e07c0661ce135460b34d9f2b712e9 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Thu, 20 Aug 2020 11:50:51 +0200 Subject: [PATCH 04/42] chore: more spacing rules for eslint (#9825) Configure `keyword-spacing`, `brace-style` and `space-before-blocks` to uniformize spacing. Valid `if`: ```ts if (condition) { // code } else { // code } ``` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-apigatewayv2/lib/http/api.ts | 2 +- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 12 +++++----- .../@aws-cdk/aws-appsync/lib/schema-field.ts | 2 +- .../aws-appsync/lib/schema-intermediate.ts | 10 ++++---- .../aws-athena/test/integ.workgroup.ts | 2 +- .../lib/custom-action-registration.ts | 12 ++++++---- packages/@aws-cdk/aws-glue/test/table.test.ts | 23 ++++++++++--------- .../private/scalable-function-attribute.ts | 4 ++-- .../@aws-cdk/aws-synthetics/lib/canary.ts | 6 ++--- packages/@aws-cdk/aws-synthetics/lib/code.ts | 2 +- .../@aws-cdk/aws-synthetics/lib/schedule.ts | 2 +- tools/cdk-build-tools/config/eslintrc.js | 3 +++ 12 files changed, 43 insertions(+), 37 deletions(-) diff --git a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts index adbb530f731b7..a15d8e929c6f6 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts +++ b/packages/@aws-cdk/aws-apigatewayv2/lib/http/api.ts @@ -190,7 +190,7 @@ export class HttpApi extends Resource implements IHttpApi { }); // to ensure the domain is ready before creating the default stage - if(props?.defaultDomainMapping) { + if (props?.defaultDomainMapping) { this.defaultStage.node.addDependency(props.defaultDomainMapping.domainName); } } diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index 7e6961627eda3..6155c41a3047b 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -303,7 +303,7 @@ export class IamResource { private arns: string[]; - private constructor(arns: string[]){ + private constructor(arns: string[]) { this.arns = arns; } @@ -360,7 +360,7 @@ export class GraphQLApi extends GraphqlApiBase { class Import extends GraphqlApiBase { public readonly apiId = attrs.graphqlApiId; public readonly arn = arn; - constructor (s: Construct, i: string){ + constructor (s: Construct, i: string) { super(s, i); } } @@ -540,19 +540,19 @@ export class GraphQLApi extends GraphqlApiBase { const allModes = [defaultMode, ...additionalModes]; allModes.map((mode) => { - if(mode.authorizationType === AuthorizationType.OIDC && !mode.openIdConnectConfig){ + if (mode.authorizationType === AuthorizationType.OIDC && !mode.openIdConnectConfig) { throw new Error('Missing default OIDC Configuration'); } - if(mode.authorizationType === AuthorizationType.USER_POOL && !mode.userPoolConfig){ + if (mode.authorizationType === AuthorizationType.USER_POOL && !mode.userPoolConfig) { throw new Error('Missing default OIDC Configuration'); } }); - if(allModes.filter((mode) => mode.authorizationType === AuthorizationType.API_KEY).length > 1){ + if (allModes.filter((mode) => mode.authorizationType === AuthorizationType.API_KEY).length > 1) { throw new Error('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } - if(allModes.filter((mode) => mode.authorizationType === AuthorizationType.IAM).length > 1){ + if (allModes.filter((mode) => mode.authorizationType === AuthorizationType.IAM).length > 1) { throw new Error('You can\'t duplicate IAM configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } } diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts index 6e4ddd6b0239a..de60b65f798c5 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts @@ -302,7 +302,7 @@ export class GraphqlType { /** * Generate the string for this attribute */ - public toString(): string{ + public toString(): string { // If an Object Type, we use the name of the Object Type let type = this.intermediateType ? this.intermediateType?.name : this.type; // If configured as required, the GraphQL Type becomes required diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts index 92e78d8a359da..bfe562333014a 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts @@ -11,7 +11,7 @@ export class Directive { /** * Add the @aws_iam directive */ - public static iam(): Directive{ + public static iam(): Directive { return new Directive('@aws_iam'); } @@ -77,7 +77,7 @@ export class InterfaceType { * - isRequired * - isRequiredList */ - public attribute(options?: BaseGraphqlTypeOptions): GraphqlType{ + public attribute(options?: BaseGraphqlTypeOptions): GraphqlType { return GraphqlType.intermediate({ isList: options?.isList, isRequired: options?.isRequired, @@ -169,7 +169,7 @@ export class ObjectType extends InterfaceType { */ public toString(): string { let title = this.name; - if(this.interfaceTypes && this.interfaceTypes.length){ + if (this.interfaceTypes && this.interfaceTypes.length) { title = `${title} implements`; this.interfaceTypes.map((interfaceType) => { title = `${title} ${interfaceType.name},`; @@ -192,9 +192,9 @@ export class ObjectType extends InterfaceType { * @param delimiter the separator betweeen directives * @default - ' ' */ - private generateDirectives(directives?: Directive[], delimiter?: string): string{ + private generateDirectives(directives?: Directive[], delimiter?: string): string { let schemaAddition = ''; - if (!directives){ return schemaAddition; } + if (!directives) { return schemaAddition; } directives.map((directive) => { schemaAddition = `${schemaAddition}${directive.statement}${delimiter ?? ' '}`; }); diff --git a/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts b/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts index fd419fa7df956..fcac72f9c8c08 100644 --- a/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts +++ b/packages/@aws-cdk/aws-athena/test/integ.workgroup.ts @@ -1,5 +1,5 @@ import * as cdk from '@aws-cdk/core'; -import { CfnWorkGroup }from '../lib'; +import { CfnWorkGroup } from '../lib'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-athena-workgroup-tags'); diff --git a/packages/@aws-cdk/aws-codepipeline-actions/lib/custom-action-registration.ts b/packages/@aws-cdk/aws-codepipeline-actions/lib/custom-action-registration.ts index 7741531b4fd88..ae75a1adeb5c0 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/lib/custom-action-registration.ts +++ b/packages/@aws-cdk/aws-codepipeline-actions/lib/custom-action-registration.ts @@ -129,11 +129,13 @@ export class CustomActionRegistration extends cdk.Construct { entityUrlTemplate: props.entityUrl, executionUrlTemplate: props.executionUrl, }, - configurationProperties: props.actionProperties === undefined ? undefined : props.actionProperties.map((ap) => { return { - key: ap.key || false, - secret: ap.secret || false, - ...ap, - }; }), + configurationProperties: props.actionProperties === undefined ? undefined : props.actionProperties.map((ap) => { + return { + key: ap.key || false, + secret: ap.secret || false, + ...ap, + }; + }), }); } } diff --git a/packages/@aws-cdk/aws-glue/test/table.test.ts b/packages/@aws-cdk/aws-glue/test/table.test.ts index a35d48e3d93dd..8a12a34483f0a 100644 --- a/packages/@aws-cdk/aws-glue/test/table.test.ts +++ b/packages/@aws-cdk/aws-glue/test/table.test.ts @@ -1510,17 +1510,18 @@ test('validate: unique partition keys', () => { }); test('validate: column names and partition keys are all unique', () => { - expect(() => { createTable({ - tableName: 'name', - columns: [{ - name: 'col1', - type: glue.Schema.STRING, - }], - partitionKeys: [{ - name: 'col1', - type: glue.Schema.STRING, - }], - }); + expect(() => { + createTable({ + tableName: 'name', + columns: [{ + name: 'col1', + type: glue.Schema.STRING, + }], + partitionKeys: [{ + name: 'col1', + type: glue.Schema.STRING, + }], + }); }).toThrowError("column names and partition keys must be unique, but 'col1' is duplicated"); }); diff --git a/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts b/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts index 21b09cd2c79e2..3e1c2e634e0b1 100644 --- a/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts +++ b/packages/@aws-cdk/aws-lambda/lib/private/scalable-function-attribute.ts @@ -5,8 +5,8 @@ import { IScalableFunctionAttribute, UtilizationScalingOptions } from '../scalab /** * A scalable lambda alias attribute */ -export class ScalableFunctionAttribute extends appscaling.BaseScalableAttribute implements IScalableFunctionAttribute{ - constructor(scope: Construct, id: string, props: ScalableFunctionAttributeProps){ +export class ScalableFunctionAttribute extends appscaling.BaseScalableAttribute implements IScalableFunctionAttribute { + constructor(scope: Construct, id: string, props: ScalableFunctionAttributeProps) { super(scope, id, props); } diff --git a/packages/@aws-cdk/aws-synthetics/lib/canary.ts b/packages/@aws-cdk/aws-synthetics/lib/canary.ts index 7fc77e5754cb7..d2adaf68a9335 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/canary.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/canary.ts @@ -43,7 +43,7 @@ export class Test { * @param code The code that the canary should run * @param handler The handler of the canary */ - private constructor(public readonly code: Code, public readonly handler: string){ + private constructor(public readonly code: Code, public readonly handler: string) { } } @@ -80,7 +80,7 @@ export class Runtime { /** * @param name The name of the runtime version */ - public constructor(public readonly name: string){ + public constructor(public readonly name: string) { } } @@ -376,7 +376,7 @@ export class Canary extends cdk.Resource { */ private generateUniqueName(): string { const name = this.node.uniqueId.toLowerCase().replace(' ', '-'); - if (name.length <= 21){ + if (name.length <= 21) { return name; } else { return name.substring(0, 15) + nameHash(name); diff --git a/packages/@aws-cdk/aws-synthetics/lib/code.ts b/packages/@aws-cdk/aws-synthetics/lib/code.ts index ac2ee074d8d66..dd75815098ec1 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/code.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/code.ts @@ -99,7 +99,7 @@ export class AssetCode extends Code { this.validateCanaryAsset(handler); // If the same AssetCode is used multiple times, retain only the first instantiation. - if (!this.asset){ + if (!this.asset) { this.asset = new s3_assets.Asset(scope, 'Code', { path: this.assetPath, ...this.options, diff --git a/packages/@aws-cdk/aws-synthetics/lib/schedule.ts b/packages/@aws-cdk/aws-synthetics/lib/schedule.ts index 1102ba603367e..3bd92c81b4d0b 100644 --- a/packages/@aws-cdk/aws-synthetics/lib/schedule.ts +++ b/packages/@aws-cdk/aws-synthetics/lib/schedule.ts @@ -46,5 +46,5 @@ export class Schedule { /** * The Schedule expression */ - public readonly expressionString: string){} + public readonly expressionString: string) {} } diff --git a/tools/cdk-build-tools/config/eslintrc.js b/tools/cdk-build-tools/config/eslintrc.js index ba6e835c87a25..d5b55ed2764ef 100644 --- a/tools/cdk-build-tools/config/eslintrc.js +++ b/tools/cdk-build-tools/config/eslintrc.js @@ -52,6 +52,9 @@ module.exports = { 'object-curly-spacing': ['error', 'always'], // { key: 'value' } 'object-curly-newline': ['error', { multiline: true, consistent: true }], // enforce consistent line breaks between braces 'object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }], // enforce "same line" or "multiple line" on object properties + 'keyword-spacing': ['error'], // require a space before & after keywords + 'brace-style': ['error', '1tbs', { allowSingleLine: true }], // enforce one true brace style + 'space-before-blocks': 'error', // require space before blocks // Require all imported dependencies are actually declared in package.json 'import/no-extraneous-dependencies': [ From 4c8c6f1b4f564c5f0ef6ae95f635da431b619257 Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Thu, 20 Aug 2020 04:21:55 -0700 Subject: [PATCH 05/42] fix(cfn-include): allow numbers to be passed to string properties (#9849) CloudFormation allows treating numbers and strings interchangeably. We previously allowed passing strings as numbers, but this change allows the conversion in the second direction: passing numbers as strings. Fixes #9784 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/test-templates/number-for-string.json | 18 ++++++++++++++++++ ...-as-numbers.json => string-for-number.json} | 0 .../test/valid-templates.test.ts | 14 +++++++++++--- packages/@aws-cdk/core/lib/cfn-parse.ts | 6 ++++++ 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 packages/@aws-cdk/cloudformation-include/test/test-templates/number-for-string.json rename packages/@aws-cdk/cloudformation-include/test/test-templates/{parsing-as-numbers.json => string-for-number.json} (100%) diff --git a/packages/@aws-cdk/cloudformation-include/test/test-templates/number-for-string.json b/packages/@aws-cdk/cloudformation-include/test/test-templates/number-for-string.json new file mode 100644 index 0000000000000..b9cf1b8198033 --- /dev/null +++ b/packages/@aws-cdk/cloudformation-include/test/test-templates/number-for-string.json @@ -0,0 +1,18 @@ +{ + "Resources": { + "Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "WebsiteConfiguration": { + "RoutingRules": [ + { + "RedirectRule": { + "HttpRedirectCode": 403 + } + } + ] + } + } + } + } +} diff --git a/packages/@aws-cdk/cloudformation-include/test/test-templates/parsing-as-numbers.json b/packages/@aws-cdk/cloudformation-include/test/test-templates/string-for-number.json similarity index 100% rename from packages/@aws-cdk/cloudformation-include/test/test-templates/parsing-as-numbers.json rename to packages/@aws-cdk/cloudformation-include/test/test-templates/string-for-number.json diff --git a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts index d29102af4eed1..e54ab96706f89 100644 --- a/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts +++ b/packages/@aws-cdk/cloudformation-include/test/valid-templates.test.ts @@ -98,11 +98,19 @@ describe('CDK Include', () => { ); }); - test('correctly parse strings as integers as needed', () => { - includeTestTemplate(stack, 'parsing-as-numbers.json'); + test('accepts strings for properties with type number', () => { + includeTestTemplate(stack, 'string-for-number.json'); expect(stack).toMatchTemplate( - loadTestFileToJsObject('parsing-as-numbers.json'), + loadTestFileToJsObject('string-for-number.json'), + ); + }); + + test('accepts numbers for properties with type string', () => { + includeTestTemplate(stack, 'number-for-string.json'); + + expect(stack).toMatchTemplate( + loadTestFileToJsObject('number-for-string.json'), ); }); diff --git a/packages/@aws-cdk/core/lib/cfn-parse.ts b/packages/@aws-cdk/core/lib/cfn-parse.ts index caf753f3f9db6..4ae2eb69746ba 100644 --- a/packages/@aws-cdk/core/lib/cfn-parse.ts +++ b/packages/@aws-cdk/core/lib/cfn-parse.ts @@ -60,6 +60,12 @@ export class FromCloudFormation { return value.toString(); } + // CloudFormation treats numbers and strings interchangeably; + // so, if we get a number here, convert it to a string + if (typeof value === 'number') { + return value.toString(); + } + // in all other cases, just return the input, // and let a validator handle it if it's not a string return value; From 697ddaebb6463163739baeec1803d79993bc1cae Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Thu, 20 Aug 2020 13:53:31 +0200 Subject: [PATCH 06/42] chore(changelog): add entry for lambda-nodejs local bundling (#9853) better advertise this change. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00155803a770a..88c47a4abd210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ All notable changes to this project will be documented in this file. See [standa * **ec2:** CloudFormation init for files, packages, sources, users, & groups ([#9664](https://github.com/aws/aws-cdk/issues/9664)) ([d6c44e8](https://github.com/aws/aws-cdk/commit/d6c44e879d370326869804a746da3dc1465b33dd)), closes [#9065](https://github.com/aws/aws-cdk/issues/9065) [#8788](https://github.com/aws/aws-cdk/issues/8788) [#8788](https://github.com/aws/aws-cdk/issues/8788) * **ecs:** add EfsVolumeConfiguration to Volume ([#8467](https://github.com/aws/aws-cdk/issues/8467)) ([85ff9fd](https://github.com/aws/aws-cdk/commit/85ff9fd7cf93082e88e2aafc97916fa505484c6d)) * **ecs:** add support for automatic HTTPS redirect ([#9341](https://github.com/aws/aws-cdk/issues/9341)) ([84a3ef6](https://github.com/aws/aws-cdk/commit/84a3ef65fcc475fb5d59522ffd0d46cf77c78e8a)), closes [#8488](https://github.com/aws/aws-cdk/issues/8488) +* **lambda-nodejs:** local bundling ([#9632](https://github.com/aws/aws-cdk/issues/9632)) ([276c322](https://github.com/aws/aws-cdk/commit/276c322780a9a8c9c6e569509a90ba0a7bec0879)) * **pipelines:** add PolicyStatements to CodeBuild project role ([#9527](https://github.com/aws/aws-cdk/issues/9527)) ([c570d9c](https://github.com/aws/aws-cdk/commit/c570d9cbd0ec618c84f5ac5c2e3256f3d3671a20)), closes [aws/aws-cdk#9163](https://github.com/aws/aws-cdk/issues/9163) * **rds:** CloudWatch logs exports for DB clusters ([#9772](https://github.com/aws/aws-cdk/issues/9772)) ([118e5c6](https://github.com/aws/aws-cdk/commit/118e5c688789cf2a69edd2a419e2d4844aa65efb)), closes [#7810](https://github.com/aws/aws-cdk/issues/7810) * **rds:** Validate log types for clusters ([#9797](https://github.com/aws/aws-cdk/issues/9797)) ([85fdeb5](https://github.com/aws/aws-cdk/commit/85fdeb5f86a75054e6066a0a4e7a7059621c9b1d)), closes [#9772](https://github.com/aws/aws-cdk/issues/9772) [#9772](https://github.com/aws/aws-cdk/issues/9772) [#9772](https://github.com/aws/aws-cdk/issues/9772) From 392675f789dc2fbef869e317a9d196bcf30f5cf2 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 20 Aug 2020 14:17:34 +0200 Subject: [PATCH 07/42] chore: cleanup awscli-compatible credential loading (#9798) There was a branch that obviously contained a bug, and yet all tests worked fine. It's because this code didn't do what I thought it did. The `~/.aws/credentials` file is something we read *explicitly*, but the `~/.aws/config` file is read *implicitly* by the `SharedIniFileCredentials` if the right environment variable is set, so we don't have to do that one explicitly. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index b8f4c98e907b3..90c0a6bc67c30 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -36,7 +36,6 @@ export class AwsCliCompatible { ec2creds: boolean | undefined, containerCreds: boolean | undefined, httpOptions: AWS.HTTPOptions | undefined) { - await forceSdkToReadConfigIfPresent(); profile = profile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; @@ -46,10 +45,9 @@ export class AwsCliCompatible { ]; if (await fs.pathExists(credentialsFileName())) { - sources.push(() => new AWS.SharedIniFileCredentials({ profile, filename: credentialsFileName(), httpOptions, tokenCodeFn })); - } - - if (await fs.pathExists(configFileName())) { + // Force reading the `config` file if it exists by setting the appropriate + // environment variable. + await forceSdkToReadConfigIfPresent(); sources.push(() => new AWS.SharedIniFileCredentials({ profile, filename: credentialsFileName(), httpOptions, tokenCodeFn })); } @@ -173,7 +171,7 @@ function configFileName() { /** * Force the JS SDK to honor the ~/.aws/config file (and various settings therein) * - * For example, ther is just *NO* way to do AssumeRole credentials as long as AWS_SDK_LOAD_CONFIG is not set, + * For example, there is just *NO* way to do AssumeRole credentials as long as AWS_SDK_LOAD_CONFIG is not set, * or read credentials from that file. * * The SDK crashes if the variable is set but the file does not exist, so conditionally set it. From b1d0ac0564a86ab325e06b18670657ee9c953e3e Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Thu, 20 Aug 2020 15:52:16 +0300 Subject: [PATCH 08/42] feat(core): facility to warn when deprecated APIs are used (#9585) Introduce `Annotations.addDeprecation()` which will attach a warning to the construct indicating that a deprecated API is used. At the moment, we only use this to warn when `.node` is used instead of `.construct`, but we will gradually use this to report the usage of all deprecated APIs as a preparation for v2.0. If the environment variable `CDK_BLOCK_DEPRECATIONS` is set (and it is set in `cdk-test`), it will cause usage of deprecated APIs to throw an error instead. Related: https://github.com/aws/aws-cdk-rfcs/issues/192 ---- #### Build will be failing until #9584 is merged ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-athena/test/athena.test.ts | 4 +- .../aws-autoscaling/lib/auto-scaling-group.ts | 4 +- .../test/auto-scaling-group.test.ts | 5 +- packages/@aws-cdk/aws-backup/lib/selection.ts | 4 +- .../aws-cognito/test/user-pool.test.ts | 4 +- .../aws-dynamodb/test/dynamodb.test.ts | 10 +- .../test/integ.dynamodb.ondemand.ts | 4 +- .../aws-dynamodb/test/integ.dynamodb.sse.ts | 4 +- .../aws-dynamodb/test/integ.dynamodb.ts | 4 +- packages/@aws-cdk/aws-ec2/lib/instance.ts | 4 +- packages/@aws-cdk/aws-ec2/lib/volume.ts | 10 +- packages/@aws-cdk/aws-ec2/lib/vpc.ts | 10 +- packages/@aws-cdk/aws-ec2/test/volume.test.ts | 2 +- packages/@aws-cdk/aws-ec2/test/vpc.test.ts | 8 +- .../@aws-cdk/aws-efs/lib/efs-file-system.ts | 4 +- .../aws-efs/test/efs-file-system.test.ts | 4 +- .../@aws-cdk/aws-eks-legacy/lib/cluster.ts | 6 +- packages/@aws-cdk/aws-eks/lib/cluster.ts | 6 +- .../@aws-cdk/aws-eks/lib/legacy-cluster.ts | 6 +- .../@aws-cdk/aws-eks/test/test.fargate.ts | 6 +- packages/@aws-cdk/aws-kms/test/test.key.ts | 8 +- .../aws-route53/test/test.hosted-zone.ts | 2 +- .../test/notifications.test.ts | 2 +- packages/@aws-cdk/aws-s3/test/test.aspect.ts | 4 +- packages/@aws-cdk/core/lib/annotations.ts | 49 +++++++++- .../@aws-cdk/core/lib/construct-compat.ts | 5 +- packages/@aws-cdk/core/lib/index.ts | 1 + packages/@aws-cdk/core/lib/tag-aspect.ts | 3 + .../@aws-cdk/core/test/test.annotations.ts | 95 +++++++++++++++++++ packages/@aws-cdk/pipelines/lib/pipeline.ts | 4 +- packages/@aws-cdk/pipelines/lib/stage.ts | 4 +- 31 files changed, 218 insertions(+), 68 deletions(-) create mode 100644 packages/@aws-cdk/core/test/test.annotations.ts diff --git a/packages/@aws-cdk/aws-athena/test/athena.test.ts b/packages/@aws-cdk/aws-athena/test/athena.test.ts index 25a43aeec0679..6cadc1a5a8310 100644 --- a/packages/@aws-cdk/aws-athena/test/athena.test.ts +++ b/packages/@aws-cdk/aws-athena/test/athena.test.ts @@ -43,8 +43,8 @@ describe('Athena Workgroup Tags', () => { }); test('test tag aspect spec correction', () => { const stack = new cdk.Stack(); - cdk.Tag.add(stack, 'key1', 'value1'); - cdk.Tag.add(stack, 'key2', 'value2'); + cdk.Tags.of(stack).add('key1', 'value1'); + cdk.Tags.of(stack).add('key2', 'value2'); new CfnWorkGroup(stack, 'Athena-Workgroup', { name: 'HelloWorld', description: 'A WorkGroup', diff --git a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts index db3de7c3fece2..d3056d32d418a 100644 --- a/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts +++ b/packages/@aws-cdk/aws-autoscaling/lib/auto-scaling-group.ts @@ -7,7 +7,7 @@ import * as sns from '@aws-cdk/aws-sns'; import { CfnAutoScalingRollingUpdate, Construct, Duration, Fn, IResource, Lazy, PhysicalName, Resource, Stack, - Tag, Tokenization, withResolved, + Tokenization, withResolved, Tags, } from '@aws-cdk/core'; import { CfnAutoScalingGroup, CfnAutoScalingGroupProps, CfnLaunchConfiguration } from './autoscaling.generated'; import { BasicLifecycleHookProps, LifecycleHook } from './lifecycle-hook'; @@ -595,7 +595,7 @@ export class AutoScalingGroup extends AutoScalingGroupBase implements }); this.connections = new ec2.Connections({ securityGroups: [this.securityGroup] }); this.securityGroups.push(this.securityGroup); - this.node.applyAspect(new Tag(NAME_TAG, this.node.path)); + Tags.of(this).add(NAME_TAG, this.node.path); this.role = props.role || new iam.Role(this, 'InstanceRole', { roleName: PhysicalName.GENERATE_IF_NEEDED, diff --git a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts index 67335c9cdf4ea..4e4e800828780 100644 --- a/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts +++ b/packages/@aws-cdk/aws-autoscaling/test/auto-scaling-group.test.ts @@ -512,8 +512,9 @@ nodeunitShim({ pauseTime: cdk.Duration.seconds(345), }, }); - asg.node.applyAspect(new cdk.Tag('superfood', 'acai')); - asg.node.applyAspect(new cdk.Tag('notsuper', 'caramel', { applyToLaunchedInstances: false })); + + cdk.Tags.of(asg).add('superfood', 'acai'); + cdk.Tags.of(asg).add('notsuper', 'caramel', { applyToLaunchedInstances: false }); // THEN expect(stack).to(haveResource('AWS::AutoScaling::AutoScalingGroup', { diff --git a/packages/@aws-cdk/aws-backup/lib/selection.ts b/packages/@aws-cdk/aws-backup/lib/selection.ts index 735d55974ed6f..6b4c1c37b1b97 100644 --- a/packages/@aws-cdk/aws-backup/lib/selection.ts +++ b/packages/@aws-cdk/aws-backup/lib/selection.ts @@ -1,5 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; -import { Construct, Lazy, Resource } from '@aws-cdk/core'; +import { Construct, Lazy, Resource, Aspects } from '@aws-cdk/core'; import { CfnBackupSelection } from './backup.generated'; import { BackupableResourcesCollector } from './backupable-resources-collector'; import { IBackupPlan } from './plan'; @@ -126,7 +126,7 @@ export class BackupSelection extends Resource implements iam.IGrantable { } if (resource.construct) { - resource.construct.node.applyAspect(this.backupableResourcesCollector); + Aspects.of(resource.construct).add(this.backupableResourcesCollector); // Cannot push `this.backupableResourcesCollector.resources` to // `this.resources` here because it has not been evaluated yet. // Will be concatenated to `this.resources` in a `Lazy.listValue` diff --git a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts index 28f5480ee998d..7576dacdf1c65 100644 --- a/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts +++ b/packages/@aws-cdk/aws-cognito/test/user-pool.test.ts @@ -2,7 +2,7 @@ import '@aws-cdk/assert/jest'; import { ABSENT } from '@aws-cdk/assert/lib/assertions/have-resource'; import { Role, ServicePrincipal } from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; -import { CfnParameter, Construct, Duration, Stack, Tag } from '@aws-cdk/core'; +import { CfnParameter, Construct, Duration, Stack, Tags } from '@aws-cdk/core'; import { AccountRecovery, Mfa, NumberAttribute, StringAttribute, UserPool, UserPoolIdentityProvider, UserPoolOperation, VerificationEmailStyle } from '../lib'; describe('User Pool', () => { @@ -227,7 +227,7 @@ describe('User Pool', () => { const pool = new UserPool(stack, 'Pool', { userPoolName: 'myPool', }); - Tag.add(pool, 'PoolTag', 'PoolParty'); + Tags.of(pool).add('PoolTag', 'PoolParty'); // THEN expect(stack).toHaveResourceLike('AWS::Cognito::UserPool', { diff --git a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts index 5c6efcf4385f0..990e9bcd42094 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/dynamodb.test.ts @@ -3,7 +3,7 @@ import '@aws-cdk/assert/jest'; import * as appscaling from '@aws-cdk/aws-applicationautoscaling'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; -import { App, CfnDeletionPolicy, ConstructNode, Duration, PhysicalName, RemovalPolicy, Stack, Tag } from '@aws-cdk/core'; +import { App, CfnDeletionPolicy, ConstructNode, Duration, PhysicalName, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; import { Attribute, AttributeType, @@ -324,7 +324,7 @@ test('when specifying every property', () => { partitionKey: TABLE_PARTITION_KEY, sortKey: TABLE_SORT_KEY, }); - table.node.applyAspect(new Tag('Environment', 'Production')); + Tags.of(table).add('Environment', 'Production'); expect(stack).toHaveResource('AWS::DynamoDB::Table', { @@ -357,7 +357,7 @@ test('when specifying sse with customer managed CMK', () => { encryption: TableEncryption.CUSTOMER_MANAGED, partitionKey: TABLE_PARTITION_KEY, }); - table.node.applyAspect(new Tag('Environment', 'Production')); + Tags.of(table).add('Environment', 'Production'); expect(stack).toHaveResource('AWS::DynamoDB::Table', { 'SSESpecification': { @@ -383,7 +383,7 @@ test('when specifying only encryptionKey', () => { encryptionKey, partitionKey: TABLE_PARTITION_KEY, }); - table.node.applyAspect(new Tag('Environment', 'Production')); + Tags.of(table).add('Environment', 'Production'); expect(stack).toHaveResource('AWS::DynamoDB::Table', { 'SSESpecification': { @@ -410,7 +410,7 @@ test('when specifying sse with customer managed CMK with encryptionKey provided encryptionKey, partitionKey: TABLE_PARTITION_KEY, }); - table.node.applyAspect(new Tag('Environment', 'Production')); + Tags.of(table).add('Environment', 'Production'); expect(stack).toHaveResource('AWS::DynamoDB::Table', { 'SSESpecification': { diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.ts b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.ts index 3304c8defec2e..83495c01355cd 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ondemand.ts @@ -1,4 +1,4 @@ -import { App, RemovalPolicy, Stack, Tag } from '@aws-cdk/core'; +import { App, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; import { Attribute, AttributeType, BillingMode, ProjectionType, StreamViewType, Table } from '../lib'; // CDK parameters @@ -58,7 +58,7 @@ const tableWithGlobalAndLocalSecondaryIndex = new Table(stack, TABLE_WITH_GLOBAL removalPolicy: RemovalPolicy.DESTROY, }); -tableWithGlobalAndLocalSecondaryIndex.node.applyAspect(new Tag('Environment', 'Production')); +Tags.of(tableWithGlobalAndLocalSecondaryIndex).add('Environment', 'Production'); tableWithGlobalAndLocalSecondaryIndex.addGlobalSecondaryIndex({ indexName: GSI_TEST_CASE_1, diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.ts b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.ts index b1f3dca8b75a3..de077281b7479 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.sse.ts @@ -1,6 +1,6 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; -import { App, RemovalPolicy, Stack, Tag } from '@aws-cdk/core'; +import { App, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; import { Attribute, AttributeType, ProjectionType, StreamViewType, Table, TableEncryption } from '../lib'; // CDK parameters @@ -58,7 +58,7 @@ const tableWithGlobalAndLocalSecondaryIndex = new Table(stack, TABLE_WITH_GLOBAL removalPolicy: RemovalPolicy.DESTROY, }); -tableWithGlobalAndLocalSecondaryIndex.node.applyAspect(new Tag('Environment', 'Production')); +Tags.of(tableWithGlobalAndLocalSecondaryIndex).add('Environment', 'Production'); tableWithGlobalAndLocalSecondaryIndex.addGlobalSecondaryIndex({ indexName: GSI_TEST_CASE_1, partitionKey: GSI_PARTITION_KEY, diff --git a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ts b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ts index 35c81b6486d3b..e01d3dd996101 100644 --- a/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ts +++ b/packages/@aws-cdk/aws-dynamodb/test/integ.dynamodb.ts @@ -1,5 +1,5 @@ import * as iam from '@aws-cdk/aws-iam'; -import { App, RemovalPolicy, Stack, Tag } from '@aws-cdk/core'; +import { App, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; import { Attribute, AttributeType, ProjectionType, StreamViewType, Table } from '../lib'; // CDK parameters @@ -56,7 +56,7 @@ const tableWithGlobalAndLocalSecondaryIndex = new Table(stack, TABLE_WITH_GLOBAL removalPolicy: RemovalPolicy.DESTROY, }); -tableWithGlobalAndLocalSecondaryIndex.node.applyAspect(new Tag('Environment', 'Production')); +Tags.of(tableWithGlobalAndLocalSecondaryIndex).add('Environment', 'Production'); tableWithGlobalAndLocalSecondaryIndex.addGlobalSecondaryIndex({ indexName: GSI_TEST_CASE_1, partitionKey: GSI_PARTITION_KEY, diff --git a/packages/@aws-cdk/aws-ec2/lib/instance.ts b/packages/@aws-cdk/aws-ec2/lib/instance.ts index 455b024c62caa..a9ef8112dc379 100644 --- a/packages/@aws-cdk/aws-ec2/lib/instance.ts +++ b/packages/@aws-cdk/aws-ec2/lib/instance.ts @@ -1,7 +1,7 @@ import * as crypto from 'crypto'; import * as iam from '@aws-cdk/aws-iam'; -import { Construct, Duration, Fn, IResource, Lazy, Resource, Stack, Tag } from '@aws-cdk/core'; +import { Construct, Duration, Fn, IResource, Lazy, Resource, Stack, Tags } from '@aws-cdk/core'; import { CloudFormationInit } from './cfn-init'; import { Connections, IConnectable } from './connections'; import { CfnInstance } from './ec2.generated'; @@ -309,7 +309,7 @@ export class Instance extends Resource implements IInstance { } this.connections = new Connections({ securityGroups: [this.securityGroup] }); this.securityGroups.push(this.securityGroup); - Tag.add(this, NAME_TAG, props.instanceName || this.node.path); + Tags.of(this).add(NAME_TAG, props.instanceName || this.node.path); this.role = props.role || new iam.Role(this, 'InstanceRole', { assumedBy: new iam.ServicePrincipal('ec2.amazonaws.com'), diff --git a/packages/@aws-cdk/aws-ec2/lib/volume.ts b/packages/@aws-cdk/aws-ec2/lib/volume.ts index 8817a08025e92..72c9af36fd079 100644 --- a/packages/@aws-cdk/aws-ec2/lib/volume.ts +++ b/packages/@aws-cdk/aws-ec2/lib/volume.ts @@ -2,7 +2,7 @@ import * as crypto from 'crypto'; import { AccountRootPrincipal, Grant, IGrantable } from '@aws-cdk/aws-iam'; import { IKey, ViaServicePrincipal } from '@aws-cdk/aws-kms'; -import { Construct, IResource, Resource, Size, SizeRoundingBehavior, Stack, Tag, Token } from '@aws-cdk/core'; +import { Construct, IResource, Resource, Size, SizeRoundingBehavior, Stack, Token, Tags } from '@aws-cdk/core'; import { CfnInstance, CfnVolume } from './ec2.generated'; import { IInstance } from './instance'; @@ -507,8 +507,8 @@ abstract class VolumeBase extends Resource implements IVolume { // The ResourceTag condition requires that all resources involved in the operation have // the given tag, so we tag this and all constructs given. - Tag.add(this, tagKey, tagValue); - constructs.forEach(construct => Tag.add(construct, tagKey, tagValue)); + Tags.of(this).add(tagKey, tagValue); + constructs.forEach(construct => Tags.of(construct).add(tagKey, tagValue)); return result; } @@ -536,8 +536,8 @@ abstract class VolumeBase extends Resource implements IVolume { // The ResourceTag condition requires that all resources involved in the operation have // the given tag, so we tag this and all constructs given. - Tag.add(this, tagKey, tagValue); - constructs.forEach(construct => Tag.add(construct, tagKey, tagValue)); + Tags.of(this).add(tagKey, tagValue); + constructs.forEach(construct => Tags.of(construct).add(tagKey, tagValue)); return result; } diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 7c4d792fcc684..6fa50c0de2175 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1,7 +1,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { ConcreteDependable, Construct, ContextProvider, DependableTrait, IConstruct, - IDependable, IResource, Lazy, Resource, Stack, Tag, Token, + IDependable, IResource, Lazy, Resource, Stack, Token, Tags, } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { @@ -1182,7 +1182,7 @@ export class Vpc extends VpcBase { this.vpcDefaultSecurityGroup = this.resource.attrDefaultSecurityGroup; this.vpcIpv6CidrBlocks = this.resource.attrIpv6CidrBlocks; - this.node.applyAspect(new Tag(NAME_TAG, this.node.path)); + Tags.of(this).add(NAME_TAG, this.node.path); this.availabilityZones = stack.availabilityZones; @@ -1369,8 +1369,8 @@ export class Vpc extends VpcBase { // These values will be used to recover the config upon provider import const includeResourceTypes = [CfnSubnet.CFN_RESOURCE_TYPE_NAME]; - subnet.node.applyAspect(new Tag(SUBNETNAME_TAG, subnetConfig.name, { includeResourceTypes })); - subnet.node.applyAspect(new Tag(SUBNETTYPE_TAG, subnetTypeTagValue(subnetConfig.subnetType), { includeResourceTypes })); + Tags.of(subnet).add(SUBNETNAME_TAG, subnetConfig.name, { includeResourceTypes }); + Tags.of(subnet).add(SUBNETTYPE_TAG, subnetTypeTagValue(subnetConfig.subnetType), { includeResourceTypes }); }); } } @@ -1488,7 +1488,7 @@ export class Subnet extends Resource implements ISubnet { Object.defineProperty(this, VPC_SUBNET_SYMBOL, { value: true }); - this.node.applyAspect(new Tag(NAME_TAG, this.node.path)); + Tags.of(this).add(NAME_TAG, this.node.path); this.availabilityZone = props.availabilityZone; const subnet = new CfnSubnet(this, 'Subnet', { diff --git a/packages/@aws-cdk/aws-ec2/test/volume.test.ts b/packages/@aws-cdk/aws-ec2/test/volume.test.ts index 05ae59f8d7a0f..e0d37a232c6d6 100644 --- a/packages/@aws-cdk/aws-ec2/test/volume.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/volume.test.ts @@ -73,7 +73,7 @@ nodeunitShim({ }); // WHEN - cdk.Tag.add(volume, 'TagKey', 'TagValue'); + cdk.Tags.of(volume).add('TagKey', 'TagValue'); // THEN cdkExpect(stack).to(haveResource('AWS::EC2::Volume', { diff --git a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts index ce94f1c9e10ed..87752fef51bdb 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/vpc.test.ts @@ -1,5 +1,5 @@ import { countResources, expect, haveResource, haveResourceLike, isSuperObject, MatchStyle } from '@aws-cdk/assert'; -import { CfnOutput, Lazy, Stack, Tag } from '@aws-cdk/core'; +import { CfnOutput, Lazy, Stack, Tags } from '@aws-cdk/core'; import { nodeunitShim, Test } from 'nodeunit-shim'; import { AclCidr, AclTraffic, CfnSubnet, CfnVPC, DefaultInstanceTenancy, GenericLinuxImage, InstanceType, InterfaceVpcEndpoint, @@ -1035,8 +1035,8 @@ nodeunitShim({ const vpc = new Vpc(stack, 'TheVPC'); // overwrite to set propagate - vpc.node.applyAspect(new Tag('BusinessUnit', 'Marketing', { includeResourceTypes: [CfnVPC.CFN_RESOURCE_TYPE_NAME] })); - vpc.node.applyAspect(new Tag('VpcType', 'Good')); + Tags.of(vpc).add('BusinessUnit', 'Marketing', { includeResourceTypes: [CfnVPC.CFN_RESOURCE_TYPE_NAME] }); + Tags.of(vpc).add('VpcType', 'Good'); expect(stack).to(haveResource('AWS::EC2::VPC', hasTags(toCfnTags(allTags)))); const taggables = ['Subnet', 'InternetGateway', 'NatGateway', 'RouteTable']; const propTags = toCfnTags(tags); @@ -1067,7 +1067,7 @@ nodeunitShim({ const vpc = new Vpc(stack, 'TheVPC'); const tag = { Key: 'Late', Value: 'Adder' }; expect(stack).notTo(haveResource('AWS::EC2::VPC', hasTags([tag]))); - vpc.node.applyAspect(new Tag(tag.Key, tag.Value)); + Tags.of(vpc).add(tag.Key, tag.Value); expect(stack).to(haveResource('AWS::EC2::VPC', hasTags([tag]))); test.done(); }, diff --git a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts index 854503f388f7d..775eaea806af6 100644 --- a/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts +++ b/packages/@aws-cdk/aws-efs/lib/efs-file-system.ts @@ -1,6 +1,6 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as kms from '@aws-cdk/aws-kms'; -import { ConcreteDependable, Construct, IDependable, IResource, RemovalPolicy, Resource, Size, Tag } from '@aws-cdk/core'; +import { ConcreteDependable, Construct, IDependable, IResource, RemovalPolicy, Resource, Size, Tags } from '@aws-cdk/core'; import { AccessPoint, AccessPointOptions } from './access-point'; import { CfnFileSystem, CfnMountTarget } from './efs.generated'; @@ -255,7 +255,7 @@ export class FileSystem extends Resource implements IFileSystem { filesystem.applyRemovalPolicy(props.removalPolicy); this.fileSystemId = filesystem.ref; - Tag.add(this, 'Name', props.fileSystemName || this.node.path); + Tags.of(this).add('Name', props.fileSystemName || this.node.path); const securityGroup = (props.securityGroup || new ec2.SecurityGroup(this, 'EfsSecurityGroup', { vpc: props.vpc, diff --git a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts index 738f81cb12369..02369563bd9a5 100644 --- a/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts +++ b/packages/@aws-cdk/aws-efs/test/efs-file-system.test.ts @@ -1,7 +1,7 @@ import { expect as expectCDK, haveResource, ResourcePart } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as kms from '@aws-cdk/aws-kms'; -import { RemovalPolicy, Size, Stack, Tag } from '@aws-cdk/core'; +import { RemovalPolicy, Size, Stack, Tags } from '@aws-cdk/core'; import { FileSystem, LifecyclePolicy, PerformanceMode, ThroughputMode } from '../lib'; let stack = new Stack(); @@ -176,7 +176,7 @@ test('support tags', () => { const fileSystem = new FileSystem(stack, 'EfsFileSystem', { vpc, }); - Tag.add(fileSystem, 'Name', 'LookAtMeAndMyFancyTags'); + Tags.of(fileSystem).add('Name', 'LookAtMeAndMyFancyTags'); // THEN expectCDK(stack).to(haveResource('AWS::EFS::FileSystem', { diff --git a/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts b/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts index 49fde85d6d49d..c7597df495297 100644 --- a/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks-legacy/lib/cluster.ts @@ -4,7 +4,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as ssm from '@aws-cdk/aws-ssm'; -import { CfnOutput, Construct, Duration, IResource, Resource, Stack, Tag, Token } from '@aws-cdk/core'; +import { CfnOutput, Construct, Duration, IResource, Resource, Stack, Token, Tags } from '@aws-cdk/core'; import { AwsAuth } from './aws-auth'; import { ClusterResource } from './cluster-resource'; import { CfnCluster, CfnClusterProps } from './eks.generated'; @@ -523,7 +523,7 @@ export class Cluster extends Resource implements ICluster { autoScalingGroup.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly')); // EKS Required Tags - Tag.add(autoScalingGroup, `kubernetes.io/cluster/${this.clusterName}`, 'owned', { + Tags.of(autoScalingGroup).add(`kubernetes.io/cluster/${this.clusterName}`, 'owned', { applyToLaunchedInstances: true, }); @@ -640,7 +640,7 @@ export class Cluster extends Resource implements ICluster { continue; } - subnet.node.applyAspect(new Tag(tag, '1')); + Tags.of(subnet).add(tag, '1'); } }; diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 9204f9ff4b475..7db245a814efb 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -4,7 +4,7 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as ssm from '@aws-cdk/aws-ssm'; -import { CfnOutput, CfnResource, Construct, IResource, Resource, Stack, Tag, Token, Duration } from '@aws-cdk/core'; +import { CfnOutput, CfnResource, Construct, IResource, Resource, Stack, Tags, Token, Duration } from '@aws-cdk/core'; import * as YAML from 'yaml'; import { AwsAuth } from './aws-auth'; import { clusterArnComponents, ClusterResource } from './cluster-resource'; @@ -872,7 +872,7 @@ export class Cluster extends Resource implements ICluster { autoScalingGroup.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly')); // EKS Required Tags - Tag.add(autoScalingGroup, `kubernetes.io/cluster/${this.clusterName}`, 'owned', { + Tags.of(autoScalingGroup).add(`kubernetes.io/cluster/${this.clusterName}`, 'owned', { applyToLaunchedInstances: true, }); @@ -1180,7 +1180,7 @@ export class Cluster extends Resource implements ICluster { continue; } - subnet.node.applyAspect(new Tag(tag, '1')); + Tags.of(subnet).add(tag, '1'); } }; diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index 02708d0dc9d0f..7aec7be0cd693 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -2,7 +2,7 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as ssm from '@aws-cdk/aws-ssm'; -import { CfnOutput, Construct, Resource, Stack, Tag, Token } from '@aws-cdk/core'; +import { CfnOutput, Construct, Resource, Stack, Token, Tags } from '@aws-cdk/core'; import { ICluster, ClusterAttributes, KubernetesVersion, NodeType, DefaultCapacityType, EksOptimizedImage, CapacityOptions, MachineImageType, AutoScalingGroupOptions, CommonClusterOptions } from './cluster'; import { clusterArnComponents } from './cluster-resource'; import { CfnCluster, CfnClusterProps } from './eks.generated'; @@ -327,7 +327,7 @@ export class LegacyCluster extends Resource implements ICluster { autoScalingGroup.role.addManagedPolicy(iam.ManagedPolicy.fromAwsManagedPolicyName('AmazonEC2ContainerRegistryReadOnly')); // EKS Required Tags - Tag.add(autoScalingGroup, `kubernetes.io/cluster/${this.clusterName}`, 'owned', { + Tags.of(autoScalingGroup).add(`kubernetes.io/cluster/${this.clusterName}`, 'owned', { applyToLaunchedInstances: true, }); @@ -361,7 +361,7 @@ export class LegacyCluster extends Resource implements ICluster { continue; } - subnet.node.applyAspect(new Tag(tag, '1')); + Tags.of(subnet).add(tag, '1'); } }; diff --git a/packages/@aws-cdk/aws-eks/test/test.fargate.ts b/packages/@aws-cdk/aws-eks/test/test.fargate.ts index f490d3f38df10..2787122883b82 100644 --- a/packages/@aws-cdk/aws-eks/test/test.fargate.ts +++ b/packages/@aws-cdk/aws-eks/test/test.fargate.ts @@ -1,7 +1,7 @@ import { expect, haveResource, haveResourceLike, ResourcePart } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; -import { Stack, Tag } from '@aws-cdk/core'; +import { Stack, Tags } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as eks from '../lib'; @@ -85,8 +85,8 @@ export = { selectors: [{ namespace: 'default' }], }); - Tag.add(stack, 'aspectTag', 'hello'); - Tag.add(cluster, 'propTag', '123'); + Tags.of(stack).add('aspectTag', 'hello'); + Tags.of(cluster).add('propTag', '123'); // THEN expect(stack).to(haveResource('Custom::AWSCDK-EKS-FargateProfile', { diff --git a/packages/@aws-cdk/aws-kms/test/test.key.ts b/packages/@aws-cdk/aws-kms/test/test.key.ts index a428ea1c05f73..bcbaaec7f1c13 100644 --- a/packages/@aws-cdk/aws-kms/test/test.key.ts +++ b/packages/@aws-cdk/aws-kms/test/test.key.ts @@ -8,7 +8,7 @@ import { SynthUtils, } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; -import { App, CfnOutput, RemovalPolicy, Stack, Tag } from '@aws-cdk/core'; +import { App, CfnOutput, RemovalPolicy, Stack, Tags } from '@aws-cdk/core'; import { Test } from 'nodeunit'; import { Key } from '../lib'; @@ -160,9 +160,9 @@ export = { p.addArnPrincipal('arn'); key.addToResourcePolicy(p); - key.node.applyAspect(new Tag('tag1', 'value1')); - key.node.applyAspect(new Tag('tag2', 'value2')); - key.node.applyAspect(new Tag('tag3', '')); + Tags.of(key).add('tag1', 'value1'); + Tags.of(key).add('tag2', 'value2'); + Tags.of(key).add('tag3', ''); expect(stack).to(exactlyMatchTemplate({ Resources: { diff --git a/packages/@aws-cdk/aws-route53/test/test.hosted-zone.ts b/packages/@aws-cdk/aws-route53/test/test.hosted-zone.ts index 45eaed8e8cafb..37d80a5908a9b 100644 --- a/packages/@aws-cdk/aws-route53/test/test.hosted-zone.ts +++ b/packages/@aws-cdk/aws-route53/test/test.hosted-zone.ts @@ -39,7 +39,7 @@ export = { const hostedZone = new HostedZone(stack, 'HostedZone', { zoneName: 'test.zone', }); - cdk.Tag.add(hostedZone, 'zoneTag', 'inMyZone'); + cdk.Tags.of(hostedZone).add('zoneTag', 'inMyZone'); // THEN expect(stack).toMatch({ diff --git a/packages/@aws-cdk/aws-s3-notifications/test/notifications.test.ts b/packages/@aws-cdk/aws-s3-notifications/test/notifications.test.ts index c919f1473aa4b..8c826e9217204 100644 --- a/packages/@aws-cdk/aws-s3-notifications/test/notifications.test.ts +++ b/packages/@aws-cdk/aws-s3-notifications/test/notifications.test.ts @@ -39,7 +39,7 @@ test('when notification are added, a custom resource is provisioned + a lambda h test('when notification are added, you can tag the lambda', () => { const stack = new cdk.Stack(); - stack.node.applyAspect(new cdk.Tag('Lambda', 'AreTagged')); + cdk.Tags.of(stack).add('Lambda', 'AreTagged'); const bucket = new s3.Bucket(stack, 'MyBucket'); diff --git a/packages/@aws-cdk/aws-s3/test/test.aspect.ts b/packages/@aws-cdk/aws-s3/test/test.aspect.ts index ba2049b0f993e..e85e4d243dca0 100644 --- a/packages/@aws-cdk/aws-s3/test/test.aspect.ts +++ b/packages/@aws-cdk/aws-s3/test/test.aspect.ts @@ -11,7 +11,7 @@ export = { new s3.Bucket(stack, 'MyBucket'); // WHEN - stack.node.applyAspect(new BucketVersioningChecker()); + cdk.Aspects.of(stack).add(new BucketVersioningChecker()); // THEN const assembly = SynthUtils.synthesize(stack); @@ -29,7 +29,7 @@ export = { }); // WHEN - stack.node.applyAspect(new BucketVersioningChecker()); + cdk.Aspects.of(stack).add(new BucketVersioningChecker()); // THEN const assembly = SynthUtils.synthesize(stack); diff --git a/packages/@aws-cdk/core/lib/annotations.ts b/packages/@aws-cdk/core/lib/annotations.ts index 8f13e09987035..8ddeedda108a2 100644 --- a/packages/@aws-cdk/core/lib/annotations.ts +++ b/packages/@aws-cdk/core/lib/annotations.ts @@ -1,6 +1,8 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { IConstruct } from './construct-compat'; +const DEPRECATIONS_SYMBOL = Symbol.for('@aws-cdk/core.deprecations'); + /** * Includes API for attaching annotations such as warning messages to constructs. */ @@ -49,6 +51,38 @@ export class Annotations { this.addMessage(cxschema.ArtifactMetadataEntryType.ERROR, message); } + /** + * Adds a deprecation warning for a specific API. + * + * Deprecations will be added only once per construct as a warning and will be + * deduplicated based on the `api`. + * + * If the environment variable `CDK_BLOCK_DEPRECATIONS` is set, this method + * will throw an error instead with the deprecation message. + * + * @param api The API being deprecated in the format `module.Class.property` + * (e.g. `@aws-cdk/core.Construct.node`). + * @param message The deprecation message to display, with information about + * alternatives. + */ + public addDeprecation(api: string, message: string) { + const text = `The API ${api} is deprecated: ${message}. This API will be removed in the next major release`; + + // throw if CDK_BLOCK_DEPRECATIONS is set + if (process.env.CDK_BLOCK_DEPRECATIONS) { + throw new Error(`${this.scope.node.path}: ${text}`); + } + + // de-dup based on api key + const set = this.deprecationsReported; + if (set.has(api)) { + return; + } + + this.addWarning(text); + set.add(api); + } + /** * Adds a message metadata entry to the construct node, to be displayed by the CDK CLI. * @param level The message level @@ -57,4 +91,17 @@ export class Annotations { private addMessage(level: string, message: string) { this.scope.node.addMetadata(level, message); } -} \ No newline at end of file + + /** + * Returns the set of deprecations reported on this construct. + */ + private get deprecationsReported() { + let set = (this.scope as any)[DEPRECATIONS_SYMBOL]; + if (!set) { + set = new Set(); + Object.defineProperty(this.scope, DEPRECATIONS_SYMBOL, { value: set }); + } + + return set; + } +} diff --git a/packages/@aws-cdk/core/lib/construct-compat.ts b/packages/@aws-cdk/core/lib/construct-compat.ts index 306e299016f7c..312ec463a92e6 100644 --- a/packages/@aws-cdk/core/lib/construct-compat.ts +++ b/packages/@aws-cdk/core/lib/construct-compat.ts @@ -447,7 +447,10 @@ export class ConstructNode { * @deprecated This API is going to be removed in the next major version of * the AWS CDK. Please use `Aspects.of(scope).add()` instead. */ - public applyAspect(aspect: IAspect): void { Aspects.of(this.host).add(aspect); } + public applyAspect(aspect: IAspect): void { + Annotations.of(this.host).addDeprecation('@aws-cdk/core.ConstructNode.applyAspect', 'Use "Aspects.of(construct).add(aspect)" instead'); + Aspects.of(this.host).add(aspect); + } /** * All parent scopes of this construct. diff --git a/packages/@aws-cdk/core/lib/index.ts b/packages/@aws-cdk/core/lib/index.ts index 92a6ae2f825ed..2ea4c92f79db4 100644 --- a/packages/@aws-cdk/core/lib/index.ts +++ b/packages/@aws-cdk/core/lib/index.ts @@ -36,6 +36,7 @@ export * from './stack-trace'; export * from './app'; export * from './context-provider'; export * from './environment'; +export * from './annotations'; export * from './runtime'; export * from './secret-value'; diff --git a/packages/@aws-cdk/core/lib/tag-aspect.ts b/packages/@aws-cdk/core/lib/tag-aspect.ts index 3c8fd7b01a6b8..34d9a6dfd4e40 100644 --- a/packages/@aws-cdk/core/lib/tag-aspect.ts +++ b/packages/@aws-cdk/core/lib/tag-aspect.ts @@ -2,6 +2,7 @@ import { IAspect, Aspects } from './aspect'; import { Construct, IConstruct } from './construct-compat'; import { ITaggable, TagManager } from './tag-manager'; +import { Annotations } from './annotations'; /** * Properties for a tag @@ -91,6 +92,7 @@ export class Tag extends TagBase { * @deprecated use `Tags.of(scope).add()` */ public static add(scope: Construct, key: string, value: string, props: TagProps = {}) { + Annotations.of(scope).addDeprecation('@aws-cdk/core.Tag.add(scope,k,v)', 'Use "Tags.of(scope).add(k,v)" instead'); Tags.of(scope).add(key, value, props); } @@ -100,6 +102,7 @@ export class Tag extends TagBase { * @deprecated use `Tags.of(scope).remove()` */ public static remove(scope: Construct, key: string, props: TagProps = {}) { + Annotations.of(scope).addDeprecation('@aws-cdk/core.Tag.remove(scope,k,v)', 'Use "Tags.of(scope).remove(k,v)" instead'); Tags.of(scope).remove(key, props); } diff --git a/packages/@aws-cdk/core/test/test.annotations.ts b/packages/@aws-cdk/core/test/test.annotations.ts new file mode 100644 index 0000000000000..4a193452a95c2 --- /dev/null +++ b/packages/@aws-cdk/core/test/test.annotations.ts @@ -0,0 +1,95 @@ +import { CloudAssembly } from '@aws-cdk/cx-api'; +import { Test } from 'nodeunit'; +import { Construct, App, Stack } from '../lib'; +import { Annotations } from '../lib/annotations'; + +const restore = process.env.CDK_BLOCK_DEPRECATIONS; + +export = { + 'tearDown'(cb: any) { + process.env.CDK_BLOCK_DEPRECATIONS = restore; // restore to the original value + cb(); + }, + + 'addDeprecation() annotates the usage of a deprecated API'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const c1 = new Construct(stack, 'Hello'); + + // WHEN + delete process.env.CDK_BLOCK_DEPRECATIONS; + Annotations.of(c1).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + + // THEN + test.deepEqual(getWarnings(app.synth()), [ + { + path: '/MyStack/Hello', + message: 'The API @aws-cdk/core.Construct.node is deprecated: use @aws-cdk.Construct.construct instead. This API will be removed in the next major release', + }, + ]); + test.done(); + }, + + 'deduplicated per node based on "api"'(test: Test) { + // GIVEN + const app = new App(); + const stack1 = new Stack(app, 'MyStack1'); + const stack2 = new Stack(app, 'MyStack2'); + const c1 = new Construct(stack1, 'Hello'); + const c2 = new Construct(stack1, 'World'); + const c3 = new Construct(stack2, 'FooBar'); + + // WHEN + delete process.env.CDK_BLOCK_DEPRECATIONS; + Annotations.of(c1).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + Annotations.of(c2).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + Annotations.of(c1).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + Annotations.of(c3).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + Annotations.of(c1).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + Annotations.of(c1).addDeprecation('@aws-cdk/core.Construct.node', 'use @aws-cdk.Construct.construct instead'); + + // THEN + test.deepEqual(getWarnings(app.synth()), [ + { + path: '/MyStack1/Hello', + message: 'The API @aws-cdk/core.Construct.node is deprecated: use @aws-cdk.Construct.construct instead. This API will be removed in the next major release', + }, + { + path: '/MyStack1/World', + message: 'The API @aws-cdk/core.Construct.node is deprecated: use @aws-cdk.Construct.construct instead. This API will be removed in the next major release', + }, + { + path: '/MyStack2/FooBar', + message: 'The API @aws-cdk/core.Construct.node is deprecated: use @aws-cdk.Construct.construct instead. This API will be removed in the next major release', + }, + ]); + test.done(); + }, + + 'CDK_BLOCK_DEPRECATIONS will throw if a deprecated API is used'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'MyStack'); + const c1 = new Construct(stack, 'Hello'); + + // THEN + process.env.CDK_BLOCK_DEPRECATIONS = '1'; + test.throws(() => Annotations.of(c1).addDeprecation('foo', 'bar'), /MyStack\/Hello: The API foo is deprecated: bar\. This API will be removed in the next major release/); + test.done(); + }, +}; + +function getWarnings(casm: CloudAssembly) { + const result = new Array<{ path: string, message: string }>(); + for (const stack of Object.values(casm.manifest.artifacts ?? {})) { + for (const [path, md] of Object.entries(stack.metadata ?? {})) { + for (const x of md) { + if (x.type === 'aws:cdk:warning') { + result.push({ path, message: x.data as string }); + } + } + } + } + return result; +} diff --git a/packages/@aws-cdk/pipelines/lib/pipeline.ts b/packages/@aws-cdk/pipelines/lib/pipeline.ts index f20021b34d1a8..6b63c6216b959 100644 --- a/packages/@aws-cdk/pipelines/lib/pipeline.ts +++ b/packages/@aws-cdk/pipelines/lib/pipeline.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as iam from '@aws-cdk/aws-iam'; -import { App, CfnOutput, Construct, PhysicalName, Stack, Stage } from '@aws-cdk/core'; +import { App, CfnOutput, Construct, PhysicalName, Stack, Stage, Aspects } from '@aws-cdk/core'; import { AssetType, DeployCdkStackAction, PublishAssetsAction, UpdatePipelineAction } from './actions'; import { appOf, assemblyBuilderOf } from './private/construct-internals'; import { AddStageOptions, AssetPublishingCommand, CdkStage, StackOutput } from './stage'; @@ -103,7 +103,7 @@ export class CdkPipeline extends Construct { projectName: maybeSuffix(props.pipelineName, '-publish'), }); - this.node.applyAspect({ visit: () => this._assets.removeAssetsStageIfEmpty() }); + Aspects.of(this).add({ visit: () => this._assets.removeAssetsStageIfEmpty() }); } /** diff --git a/packages/@aws-cdk/pipelines/lib/stage.ts b/packages/@aws-cdk/pipelines/lib/stage.ts index dd5aa28c5e50e..e916d8131c7a2 100644 --- a/packages/@aws-cdk/pipelines/lib/stage.ts +++ b/packages/@aws-cdk/pipelines/lib/stage.ts @@ -1,6 +1,6 @@ import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as cpactions from '@aws-cdk/aws-codepipeline-actions'; -import { Construct, Stage } from '@aws-cdk/core'; +import { Construct, Stage, Aspects } from '@aws-cdk/core'; import * as cxapi from '@aws-cdk/cx-api'; import { AssetType, DeployCdkStackAction } from './actions'; import { AssetManifestReader, DockerImageManifestEntry, FileManifestEntry } from './private/asset-manifest'; @@ -55,7 +55,7 @@ export class CdkStage extends Construct { this.cloudAssemblyArtifact = props.cloudAssemblyArtifact; this.host = props.host; - this.node.applyAspect({ visit: () => this.prepareStage() }); + Aspects.of(this).add({ visit: () => this.prepareStage() }); } /** From 960ef1237e8379090e78dca554401213c81d2be7 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 20 Aug 2020 16:49:04 +0200 Subject: [PATCH 09/42] fix(core): Access Denied using legacy synthesizer with new bootstrap (#9831) We always intended the FileAsset KMS Key to be transparently usable by any IAM identity allowed to read from and write to the FileAsset Bucket. We incorrectly implemented this, however. We used to use the following key policy: ``` - Action: [...] Principal: { AWS: "123456789012" } Condition: StringEquals: kms:ViaService: Fn::Sub: s3.${AWS::Region}.amazonaws.com ``` And this was intended to mean "any identity from the given account". That is *not* how KMS interprets it, though. `Principal: { AWS: "123456789012" }` is equivalent to `Principal: { AWS: "arn:aws:iam::123456789012:root" }`, and `arn:aws:iam::123456789012:root` is a principal which is treated in a special way by KMS, and it means "use the caller's IAM Identity Policy instead". So while I was under the impression that it was strictly necessary for KMS usage permissions to exist both on the key and on the identity, this is only true if you use the `arn:aws:iam::123456789012:root` principal. The correct way to express the condition we had intended to express was instead to use a condition called `kms:CallerAccount` in combination with the principal `*`: ``` - Action: [...] Principal: { AWS: "*" } Condition: StringEquals: kms:CallerAccount: "123456789012" kms:ViaService: Fn::Sub: s3.${AWS::Region}.amazonaws.com ``` This PR changes the key policy in the bootstrap resources to use the policy that we always had intended. This now gets rid of the requirement for IAM identities to list `kms:Decrypt` in their role policy, and so gets rid of the requirement for them to know the KMS key ARN. This makes the stack synthesized by the legacy stack synthesizer work with the new bootstrap stack, and also removes the need for the new synthesizer to import the KMS key ARN using `Fn::ImportValue`. --- However, the new stack synthesizer *does* now require that you have the newest bootstrap stack installed, and since templates are likely deployed using a pipeline, the CLI is not involved to do the `MINIMUM_BOOTSTRAP_STACK` version check. Originally I had intended to use the version `Export` to add version checking to the template, but that doesn't actually work for 2 reasons: - `Fn::ImportValue` can only occur in a limited set of positions in the CloudFormation template. - If an `Export` is used by a Stack, it cannot be changed anymore. That means that even if we had done the check using `Fn::ImportValue`, users wouldn't have been allowed to update the bootstrap stack anymore. What we should have done from the start, and what this PR introduces, is storing the bootstrap stack version in an SSM Parameter Store Parameter. This value can be inspected in a CloudFormation **Rules** section, which will produce a readable error message about why the template cannot be deployed. Any assertion failure reasons will be reported on a `ROLLBACK_IN_PROGRESS` event, so classify those appropriately in the stack monitor so the error message gets displayed. Fixes #9607. BREAKING CHANGE: (cdk-pipelines) users of CDK Pipelines (and other users of the new stack synthesizer) will need to update their bootstrap stack by running `cdk bootstrap` with the new CLI. Until they do, deployments will fail with the error: `Unable to fetch parameters [/aws-cdk-bootstrap/hnb659fds/version]` ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-s3-assets/test/asset.test.ts | 27 +----------- .../test/bucket-deployment.test.ts | 29 +------------ packages/@aws-cdk/core/lib/assets.ts | 2 + .../stack-synthesizers/default-synthesizer.ts | 42 ++++++++++++++++++- .../test.new-style-synthesis.ts | 29 ++++++++++++- .../integ.pipeline-with-assets.expected.json | 32 ++++++++++++++ .../test/integ.pipeline.expected.json | 32 ++++++++++++++ .../lib/api/bootstrap/bootstrap-props.ts | 2 + .../lib/api/bootstrap/bootstrap-template.yaml | 32 ++++++++++---- .../lib/api/bootstrap/deploy-bootstrap.ts | 13 +++++- .../cloudformation/stack-activity-monitor.ts | 11 +++-- packages/aws-cdk/test/api/bootstrap2.test.ts | 5 +-- 12 files changed, 181 insertions(+), 75 deletions(-) diff --git a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts index ffef076b292f6..199594ef95bf0 100644 --- a/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts +++ b/packages/@aws-cdk/aws-s3-assets/test/asset.test.ts @@ -1,4 +1,4 @@ -import { arrayWith, ResourcePart, SynthUtils } from '@aws-cdk/assert'; +import { ResourcePart, SynthUtils } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import * as iam from '@aws-cdk/aws-iam'; import * as cxschema from '@aws-cdk/cloud-assembly-schema'; @@ -124,31 +124,6 @@ test('"readers" or "grantRead" can be used to grant read permissions on the asse }); }); -test('"grantRead" also gives KMS permissions when using the new bootstrap stack', () => { - const stack = new cdk.Stack(undefined, undefined, { - synthesizer: new cdk.DefaultStackSynthesizer(), - }); - const group = new iam.Group(stack, 'MyGroup'); - - const asset = new Asset(stack, 'MyAsset', { - path: path.join(__dirname, 'sample-asset-directory'), - readers: [group], - }); - - asset.grantRead(group); - - expect(stack).toHaveResource('AWS::IAM::Policy', { - PolicyDocument: { - Version: '2012-10-17', - Statement: arrayWith({ - Action: ['kms:Decrypt', 'kms:DescribeKey'], - Effect: 'Allow', - Resource: { 'Fn::ImportValue': 'CdkBootstrap-hnb659fds-FileAssetKeyArn' }, - }), - }, - }); -}); - test('fails if directory not found', () => { const stack = new cdk.Stack(); expect(() => new Asset(stack, 'MyDirectory', { diff --git a/packages/@aws-cdk/aws-s3-deployment/test/bucket-deployment.test.ts b/packages/@aws-cdk/aws-s3-deployment/test/bucket-deployment.test.ts index 0859347c66c5f..09b169298c0f3 100644 --- a/packages/@aws-cdk/aws-s3-deployment/test/bucket-deployment.test.ts +++ b/packages/@aws-cdk/aws-s3-deployment/test/bucket-deployment.test.ts @@ -1,4 +1,3 @@ -import { arrayWith } from '@aws-cdk/assert'; import '@aws-cdk/assert/jest'; import * as cloudfront from '@aws-cdk/aws-cloudfront'; import * as iam from '@aws-cdk/aws-iam'; @@ -621,30 +620,4 @@ test('deploy without deleting missing files from destination', () => { expect(stack).toHaveResourceLike('Custom::CDKBucketDeployment', { Prune: false, }); -}); - -test('Deployment role gets KMS permissions when using assets from new style synthesizer', () => { - const stack = new cdk.Stack(undefined, undefined, { - synthesizer: new cdk.DefaultStackSynthesizer(), - }); - const bucket = new s3.Bucket(stack, 'Dest'); - - // WHEN - new s3deploy.BucketDeployment(stack, 'Deploy', { - sources: [s3deploy.Source.asset(path.join(__dirname, 'my-website'))], - destinationBucket: bucket, - }); - - // THEN - expect(stack).toHaveResource('AWS::IAM::Policy', { - PolicyDocument: { - Version: '2012-10-17', - Statement: arrayWith({ - Action: ['kms:Decrypt', 'kms:DescribeKey'], - Effect: 'Allow', - Resource: { 'Fn::ImportValue': 'CdkBootstrap-hnb659fds-FileAssetKeyArn' }, - }), - }, - }); - -}); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/assets.ts b/packages/@aws-cdk/core/lib/assets.ts index 50dbcddbcaf5f..012b7da4d489c 100644 --- a/packages/@aws-cdk/core/lib/assets.ts +++ b/packages/@aws-cdk/core/lib/assets.ts @@ -223,6 +223,8 @@ export interface FileAssetLocation { * can be used as an example for how to configure the key properly. * * @default - Asset bucket is not encrypted + * @deprecated Since bootstrap bucket v4, the key policy properly allows use of the + * key via the bucket and no additional parameters have to be granted anymore. */ readonly kmsKeyArn?: string; } diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts index 5a373cd3ed061..cac58e7461528 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts @@ -4,6 +4,8 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import * as cxapi from '@aws-cdk/cx-api'; import { DockerImageAssetLocation, DockerImageAssetSource, FileAssetLocation, FileAssetPackaging, FileAssetSource } from '../assets'; import { Fn } from '../cfn-fn'; +import { CfnParameter } from '../cfn-parameter'; +import { CfnRule } from '../cfn-rule'; import { ISynthesisSession } from '../construct-compat'; import { Stack } from '../stack'; import { Token } from '../token'; @@ -17,7 +19,7 @@ export const BOOTSTRAP_QUALIFIER_CONTEXT = '@aws-cdk/core:bootstrapQualifier'; /** * The minimum bootstrap stack version required by this app. */ -const MIN_BOOTSTRAP_STACK_VERSION = 3; +const MIN_BOOTSTRAP_STACK_VERSION = 4; /** * Configuration properties for DefaultStackSynthesizer @@ -233,6 +235,8 @@ export class DefaultStackSynthesizer implements IStackSynthesizer { this.imageAssetPublishingRoleArn = specialize(this.props.imageAssetPublishingRoleArn ?? DefaultStackSynthesizer.DEFAULT_IMAGE_ASSET_PUBLISHING_ROLE_ARN); this._kmsKeyArnExportName = specialize(this.props.fileAssetKeyArnExportName ?? DefaultStackSynthesizer.DEFAULT_FILE_ASSET_KEY_ARN_EXPORT_NAME); /* eslint-enable max-len */ + + addBootstrapVersionRule(stack, MIN_BOOTSTRAP_STACK_VERSION, qualifier); } public addFileAsset(asset: FileAssetSource): FileAssetLocation { @@ -270,7 +274,6 @@ export class DefaultStackSynthesizer implements IStackSynthesizer { httpUrl, s3ObjectUrl, s3Url: httpUrl, - kmsKeyArn: Fn.importValue(cfnify(this._kmsKeyArnExportName)), }; } @@ -462,3 +465,38 @@ function stackLocationOrInstrinsics(stack: Stack) { urlSuffix: resolvedOr(stack.urlSuffix, '${AWS::URLSuffix}'), }; } + +/** + * Add a CfnRule to the Stack which checks the current version of the bootstrap stack this template is targeting + * + * The CLI normally checks this, but in a pipeline the CLI is not involved + * so we encode this rule into the template in a way that CloudFormation will check it. + */ +function addBootstrapVersionRule(stack: Stack, requiredVersion: number, qualifier: string) { + const param = new CfnParameter(stack, 'BootstrapVersion', { + type: 'AWS::SSM::Parameter::Value', + description: 'Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store.', + default: `/aws-cdk-bootstrap/${qualifier}/version`, + }); + + // There is no >= check in CloudFormation, so we have to check the number + // is NOT in [1, 2, 3, ... - 1] + const oldVersions = range(1, requiredVersion).map(n => `${n}`); + + new CfnRule(stack, 'CheckBootstrapVersion', { + assertions: [ + { + assert: Fn.conditionNot(Fn.conditionContains(oldVersions, param.valueAsString)), + assertDescription: `CDK bootstrap stack version ${requiredVersion} required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.`, + }, + ], + }); +} + +function range(startIncl: number, endExcl: number) { + const ret = new Array(); + for (let i = startIncl; i < endExcl; i++) { + ret.push(i); + } + return ret; +} \ No newline at end of file diff --git a/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts b/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts index 6ed4c1a52a360..79c852d494247 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts @@ -35,7 +35,10 @@ export = { // THEN -- the S3 url is advertised on the stack artifact const stackArtifact = asm.getStackArtifact('Stack'); - test.equals(stackArtifact.stackTemplateAssetObjectUrl, 's3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/4bdae6e3b1b15f08c889d6c9133f24731ee14827a9a9ab9b6b6a9b42b6d34910'); + + const templateHash = '19e1e8612660f79362e091714ab7b3583961936d762c75be8b8083c3af40850a'; + + test.equals(stackArtifact.stackTemplateAssetObjectUrl, `s3://cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}/${templateHash}`); // THEN - the template is in the asset manifest const manifestArtifact = asm.artifacts.filter(isAssetManifest)[0]; @@ -49,7 +52,7 @@ export = { destinations: { 'current_account-current_region': { bucketName: 'cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}', - objectKey: '4bdae6e3b1b15f08c889d6c9133f24731ee14827a9a9ab9b6b6a9b42b6d34910', + objectKey: templateHash, assumeRoleArn: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}', }, }, @@ -58,6 +61,28 @@ export = { test.done(); }, + 'version check is added to template'(test: Test) { + // GIVEN + new CfnResource(stack, 'Resource', { + type: 'Some::Resource', + }); + + // THEN + const template = app.synth().getStackByName('Stack').template; + test.deepEqual(template?.Parameters?.BootstrapVersion?.Type, 'AWS::SSM::Parameter::Value'); + test.deepEqual(template?.Parameters?.BootstrapVersion?.Default, '/aws-cdk-bootstrap/hnb659fds/version'); + + const assertions = template?.Rules?.CheckBootstrapVersion?.Assertions ?? []; + test.deepEqual(assertions.length, 1); + test.deepEqual(assertions[0].Assert, { + 'Fn::Not': [ + { 'Fn::Contains': [['1', '2', '3'], { Ref: 'BootstrapVersion' }] }, + ], + }); + + test.done(); + }, + 'add file asset'(test: Test) { // WHEN const location = stack.synthesizer.addFileAsset({ diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json index 67229ae806bb0..0f87f89024dbb 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json @@ -1,4 +1,36 @@ { + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws-cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store." + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 4 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + }, "Resources": { "PipelineUpdatePipelineSelfMutationRole57E559E8": { "Type": "AWS::IAM::Role", diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json index 78e618e62ae12..336c2494b3f00 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json @@ -1,4 +1,36 @@ { + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/aws-cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store." + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 4 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + }, "Resources": { "PipelineUpdatePipelineSelfMutationRole57E559E8": { "Type": "AWS::IAM::Role", diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts index ff91b55227c75..99f879358bda6 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts @@ -8,6 +8,8 @@ export const REPOSITORY_NAME_OUTPUT = 'RepositoryName'; export const BUCKET_DOMAIN_NAME_OUTPUT = 'BucketDomainName'; /** @experimental */ export const BOOTSTRAP_VERSION_OUTPUT = 'BootstrapVersion'; +/** @experimental */ +export const BOOTSTRAP_VERSION_RESOURCE = 'CdkBootstrapVersion'; /** * Options for the bootstrapEnvironment operation(s) diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index c3b744c83d9e2..8adc6f447dc82 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -65,7 +65,7 @@ Conditions: UsePublicAccessBlockConfiguration: Fn::Equals: - 'true' - - Ref: PublicAccessBlockConfiguration + - Ref: PublicAccessBlockConfiguration Resources: FileAssetsBucketEncryptionKey: Type: AWS::KMS::Key @@ -99,11 +99,14 @@ Resources: - kms:GenerateDataKey* Effect: Allow Principal: - AWS: - Ref: AWS::AccountId + # Not actually everyone -- see below for Conditions + AWS: "*" Resource: "*" Condition: StringEquals: + # See https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-caller-account + kms:CallerAccount: + Ref: AWS::AccountId kms:ViaService: - Fn::Sub: s3.${AWS::Region}.amazonaws.com - Action: @@ -143,7 +146,7 @@ Resources: BlockPublicPolicy: true IgnorePublicAcls: true RestrictPublicBuckets: true - - Ref: AWS::NoValue + - Ref: AWS::NoValue UpdateReplacePolicy: Retain StagingBucketPolicy: Type: 'AWS::S3::BucketPolicy' @@ -350,6 +353,15 @@ Resources: - Ref: AWS::NoValue RoleName: Fn::Sub: cdk-${Qualifier}-cfn-exec-role-${AWS::AccountId}-${AWS::Region} + # The SSM parameter is used in pipeline-deployed templates to verify the version + # of the bootstrap resources. + CdkBootstrapVersion: + Type: AWS::SSM::Parameter + Properties: + Type: String + Name: + Fn::Sub: '/aws-cdk-bootstrap/${Qualifier}/version' + Value: 4 Outputs: BucketName: Description: The name of the S3 bucket owned by the CDK toolkit stack @@ -359,8 +371,11 @@ Outputs: Description: The domain name of the S3 bucket owned by the CDK toolkit stack Value: Fn::Sub: "${StagingBucket.RegionalDomainName}" + # @deprecated - This Export can be removed at some future point in time. + # We can't do it today because if there are stacks that use it, the bootstrap + # stack cannot be updated. Not used anymore by apps >= 1.60.0 FileAssetKeyArn: - Description: The ARN of the KMS key used to encrypt the asset bucket + Description: The ARN of the KMS key used to encrypt the asset bucket (deprecated) Value: Fn::If: - CreateNewKey @@ -373,10 +388,9 @@ Outputs: Description: The name of the ECR repository which hosts docker image assets Value: Fn::Sub: "${ContainerAssetsRepository}" + # The Output is used by the CLI to verify the version of the bootstrap resources. BootstrapVersion: Description: The version of the bootstrap resources that are currently mastered in this stack - Value: '3' - Export: - Name: - Fn::Sub: CdkBootstrap-${Qualifier}-Version \ No newline at end of file + Value: + Fn::GetAtt: [CdkBootstrapVersion, Value] \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts b/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts index c30f9cb6138d8..9182e291fee17 100644 --- a/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts +++ b/packages/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts @@ -59,5 +59,16 @@ export async function deployBootstrapStack( } function bootstrapVersionFromTemplate(template: any): number { - return parseInt(template.Outputs?.[BOOTSTRAP_VERSION_OUTPUT]?.Value ?? '0', 10); + const versionSources = [ + template.Outputs?.[BOOTSTRAP_VERSION_OUTPUT]?.Value, + template.Resources?.[BOOTSTRAP_VERSION_OUTPUT]?.Properties?.Value, + ]; + + for (const vs of versionSources) { + if (typeof vs === 'number') { return vs; } + if (typeof vs === 'string' && !isNaN(parseInt(vs, 10))) { + return parseInt(vs, 10); + } + } + return 0; } \ No newline at end of file diff --git a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts index a553d103da403..3a50677f0373a 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation/stack-activity-monitor.ts @@ -383,7 +383,7 @@ abstract class ActivityPrinterBase implements IActivityPrinter { this.resourcesInProgress[activity.event.LogicalResourceId] = activity; } - if (status.endsWith('_FAILED')) { + if (hasErrorMessage(status)) { const isCancelled = (activity.event.ResourceStatusReason ?? '').indexOf('cancelled') > -1; // Cancelled is not an interesting failure reason @@ -630,7 +630,7 @@ export class CurrentActivityPrinter extends ActivityPrinterBase { } private failureReasonOnNextLine(activity: StackActivity) { - return (activity.event.ResourceStatus ?? '').endsWith('_FAILED') + return hasErrorMessage(activity.event.ResourceStatus ?? '') ? `\n${' '.repeat(TIMESTAMP_WIDTH + STATUS_WIDTH + 6)}${colors.red(activity.event.ResourceStatusReason ?? '')}` : ''; } @@ -642,6 +642,10 @@ const MAX_PROGRESSBAR_WIDTH = 60; const MIN_PROGRESSBAR_WIDTH = 10; const PROGRESSBAR_EXTRA_SPACE = 2 /* leading spaces */ + 2 /* brackets */ + 4 /* progress number decoration */ + 6 /* 2 progress numbers up to 999 */; +function hasErrorMessage(status: string) { + return status.endsWith('_FAILED') || status === 'ROLLBACK_IN_PROGRESS' || status === 'UPDATE_ROLLBACK_IN_PROGRESS'; +} + function colorFromStatusResult(status?: string) { if (!status) { return colors.reset; @@ -672,7 +676,8 @@ function colorFromStatusActivity(status?: string) { if (status.startsWith('CREATE_') || status.startsWith('UPDATE_')) { return colors.green; } - if (status.startsWith('ROLLBACK_')) { + // For stacks, it may also be 'UPDDATE_ROLLBACK_IN_PROGRESS' + if (status.indexOf('ROLLBACK_') !== -1) { return colors.yellow; } if (status.startsWith('DELETE_')) { diff --git a/packages/aws-cdk/test/api/bootstrap2.test.ts b/packages/aws-cdk/test/api/bootstrap2.test.ts index 94dbccb2d2a42..c66fa70918b11 100644 --- a/packages/aws-cdk/test/api/bootstrap2.test.ts +++ b/packages/aws-cdk/test/api/bootstrap2.test.ts @@ -108,11 +108,8 @@ describe('Bootstrapping v2', () => { .map((o: any) => o.Export.Name); expect(exports).toEqual([ - // This is used by aws-s3-assets + // This used to be used by aws-s3-assets { 'Fn::Sub': 'CdkBootstrap-${Qualifier}-FileAssetKeyArn' }, - // This is used by the CLI to verify the bootstrap stack version, - // and could also be used by templates which are deployed through pipelines. - { 'Fn::Sub': 'CdkBootstrap-${Qualifier}-Version' }, ]); }); From 952e686989875e53a819c68513bba77c7fdd5e91 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 20 Aug 2020 17:13:52 +0200 Subject: [PATCH 10/42] fix(bootstrap): add alias for the asset key (#9872) Add an alias (effectively, a display name) for the file asset bucket encryption key, so it is easier to recognize in the console. This change is otherwise not functional, the alias is not used to refer to the key. Fixes #6719. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cdk/lib/api/bootstrap/bootstrap-template.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index 8adc6f447dc82..eb90045569e8b 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -121,6 +121,14 @@ Resources: Fn::Sub: "${FilePublishingRole.Arn}" Resource: "*" Condition: CreateNewKey + FileAssetsBucketEncryptionKeyAlias: + Condition: CreateNewKey + Type: AWS::KMS::Alias + Properties: + AliasName: + Fn::Sub: "alias/cdk-${Qualifier}-assets-key" + TargetKeyId: + Ref: FileAssetsBucketEncryptionKey StagingBucket: Type: AWS::S3::Bucket Properties: From 7ec598eff0cbdc88c6a80d5d23d533e892f868e8 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 20 Aug 2020 20:16:22 +0200 Subject: [PATCH 11/42] chore: clarify that breaking changes are for experimental APIs (#9876) Change the "BREAKING CHANGES" header in the CHANGELOG to "BREAKING CHANGES TO EXPERIMENTAL FEATURES" to make it sure that stable features are not being broken. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- bump.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bump.sh b/bump.sh index 4e27012be15c7..028779e5a748d 100755 --- a/bump.sh +++ b/bump.sh @@ -21,3 +21,13 @@ echo "Starting ${version} version bump" # Generate CHANGELOG and create a commit (see .versionrc.json) npx standard-version --release-as ${version} + +# I am sorry. +# +# I've gone diving through the code of `conventional-changelog` to see if there +# was a way to configure the string and ultimately I decided that a 'sed' was the simpler +# way to go. +sed -i.tmp -e 's/BREAKING CHANGES$/BREAKING CHANGES TO EXPERIMENTAL FEATURES/' CHANGELOG.md +rm CHANGELOG.md.tmp +git add CHANGELOG.md +git commit --amend --no-edit From 371e8da890061e61e71fef10eb262cd0bb1a25e0 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 20 Aug 2020 22:09:23 +0100 Subject: [PATCH 12/42] fix(cfn-include): short form for Condition (#9865) Add YAML support for the short form of Condition: `!Condition`. fixes #9785 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../cloudformation-include/lib/file-utils.ts | 1 + .../yaml/short-form-conditions.yaml | 18 ++++++++ .../test/yaml-templates.test.ts | 45 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 packages/@aws-cdk/cloudformation-include/test/test-templates/yaml/short-form-conditions.yaml diff --git a/packages/@aws-cdk/cloudformation-include/lib/file-utils.ts b/packages/@aws-cdk/cloudformation-include/lib/file-utils.ts index 65a05101bcb90..eca3a7a0110ba 100644 --- a/packages/@aws-cdk/cloudformation-include/lib/file-utils.ts +++ b/packages/@aws-cdk/cloudformation-include/lib/file-utils.ts @@ -35,6 +35,7 @@ const shortForms: yaml_types.Schema.CustomTag[] = [ 'Select', 'Split', 'Transform', 'And', 'Equals', 'If', 'Not', 'Or', ].map(name => makeTagForCfnIntrinsic(name)).concat( makeTagForCfnIntrinsic('Ref', false), + makeTagForCfnIntrinsic('Condition', false), makeTagForCfnIntrinsic('GetAtt', true, (_doc: yaml.Document, cstNode: yaml_cst.CST.Node): any => { // The position of the leftmost period and opening bracket tell us what syntax is being used // If no brackets are found, then the dot notation is being used; the leftmost dot separates the diff --git a/packages/@aws-cdk/cloudformation-include/test/test-templates/yaml/short-form-conditions.yaml b/packages/@aws-cdk/cloudformation-include/test/test-templates/yaml/short-form-conditions.yaml new file mode 100644 index 0000000000000..376f77921ab5f --- /dev/null +++ b/packages/@aws-cdk/cloudformation-include/test/test-templates/yaml/short-form-conditions.yaml @@ -0,0 +1,18 @@ +Conditions: + AlwaysTrueCond: + !Not [ !Equals [ !Ref "AWS::Region", completely-made-up-region1 ] ] + AnotherAlwaysTrueCond: + !Not [ !Equals [ !Ref "AWS::Region", completely-made-up-region2 ] ] + ThirdAlwaysTrueCond: + !Not [ !Equals [ !Ref "AWS::Region", completely-made-up-region3 ] ] + CombinedCond: + !Or [!Condition AlwaysTrueCond, !Condition AnotherAlwaysTrueCond, !Condition ThirdAlwaysTrueCond] +Resources: + Bucket: + Type: AWS::S3::Bucket + Properties: + BucketName: + !If + - CombinedCond + - MyBucketName + - !Ref AWS::NoValue diff --git a/packages/@aws-cdk/cloudformation-include/test/yaml-templates.test.ts b/packages/@aws-cdk/cloudformation-include/test/yaml-templates.test.ts index 11180842bdb34..99339a064a9e1 100644 --- a/packages/@aws-cdk/cloudformation-include/test/yaml-templates.test.ts +++ b/packages/@aws-cdk/cloudformation-include/test/yaml-templates.test.ts @@ -316,6 +316,51 @@ describe('CDK Include', () => { }); }); + test('can ingest a template with the short form Conditions', () => { + includeTestTemplate(stack, 'short-form-conditions.yaml'); + + expect(stack).toMatchTemplate({ + "Conditions": { + "AlwaysTrueCond": { + "Fn::Not": [ + { "Fn::Equals": [{ "Ref": "AWS::Region" }, "completely-made-up-region1"] }, + ], + }, + "AnotherAlwaysTrueCond": { + "Fn::Not": [ + { "Fn::Equals": [{ "Ref": "AWS::Region" }, "completely-made-up-region2"] }, + ], + }, + "ThirdAlwaysTrueCond": { + "Fn::Not": [ + { "Fn::Equals": [{ "Ref": "AWS::Region" }, "completely-made-up-region3"] }, + ], + }, + "CombinedCond": { + "Fn::Or": [ + { "Condition": "AlwaysTrueCond" }, + { "Condition": "AnotherAlwaysTrueCond" }, + { "Condition": "ThirdAlwaysTrueCond" }, + ], + }, + }, + "Resources": { + "Bucket": { + "Type": "AWS::S3::Bucket", + "Properties": { + "BucketName": { + "Fn::If": [ + "CombinedCond", + "MyBucketName", + { "Ref": "AWS::NoValue" }, + ], + }, + }, + }, + }, + }); + }); + test('can ingest a yaml with long-form functions and output it unchanged', () => { includeTestTemplate(stack, 'long-form-subnet.yaml'); From dae54eccf995c868ddfc839f9ab078169a34464f Mon Sep 17 00:00:00 2001 From: Alban Esc Date: Thu, 20 Aug 2020 23:41:06 -0700 Subject: [PATCH 13/42] feat(stepfunctions-tasks): add support for CodeBuild StartBuild API (#9757) **Implementation** Update package `@aws-cdk/aws-stepfunctions-tasks` to include support for CodeBuild **StartBuild** API as per documentation here: https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html Includes support for the following Amazon SageMaker API calls: * `StartBuild` Closes #8043 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-stepfunctions-tasks/README.md | 41 +++ .../lib/codebuild/start-build.ts | 109 ++++++++ .../aws-stepfunctions-tasks/lib/index.ts | 1 + .../aws-stepfunctions-tasks/package.json | 2 + .../codebuild/integ.start-build.expected.json | 259 ++++++++++++++++++ .../test/codebuild/integ.start-build.ts | 68 +++++ .../test/codebuild/start-build.test.ts | 157 +++++++++++ 7 files changed, 637 insertions(+) create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.ts create mode 100644 packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md index 568e7f957f2e7..600ee8fdd03af 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/README.md +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/README.md @@ -28,6 +28,8 @@ This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aw - [Evaluate Expression](#evaluate-expression) - [Batch](#batch) - [SubmitJob](#submitjob) +- [CodeBuild](#codebuild) + - [StartBuild](#startbuild) - [DynamoDB](#dynamodb) - [GetItem](#getitem) - [PutItem](#putitem) @@ -235,6 +237,45 @@ const task = new tasks.BatchSubmitJob(this, 'Submit Job', { }); ``` +## CodeBuild + +Step Functions supports [CodeBuild](https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html) through the service integration pattern. + +### StartBuild + +[StartBuild](https://docs.aws.amazon.com/codebuild/latest/APIReference/API_StartBuild.html) starts a CodeBuild Project by Project Name. + +```ts +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as tasks from '@aws-cdk/aws-stepfunctions-tasks'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; + +const codebuildProject = new codebuild.Project(stack, 'Project', { + projectName: 'MyTestProject', + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + build: { + commands: [ + 'echo "Hello, CodeBuild!"', + ], + }, + }, + }), +}); + +const task = new tasks.CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + environmentVariablesOverride: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), + }, + }, +}); +``` + ## DynamoDB You can call DynamoDB APIs from a `Task` state. diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts new file mode 100644 index 0000000000000..f4341a3e7c521 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/codebuild/start-build.ts @@ -0,0 +1,109 @@ +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as iam from '@aws-cdk/aws-iam'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; +import * as cdk from '@aws-cdk/core'; +import { integrationResourceArn, validatePatternSupported } from '../private/task-utils'; + +/** + * Properties for CodeBuildStartBuild + */ +export interface CodeBuildStartBuildProps extends sfn.TaskStateBaseProps { + /** + * CodeBuild project to start + */ + readonly project: codebuild.IProject; + /** + * A set of environment variables to be used for this build only. + * + * @default - the latest environment variables already defined in the build project. + */ + readonly environmentVariablesOverride?: { [name: string]: codebuild.BuildEnvironmentVariable }; +} + +/** + * Start a CodeBuild Build as a task + * + * @see https://docs.aws.amazon.com/step-functions/latest/dg/connect-codebuild.html + */ +export class CodeBuildStartBuild extends sfn.TaskStateBase { + private static readonly SUPPORTED_INTEGRATION_PATTERNS: sfn.IntegrationPattern[] = [ + sfn.IntegrationPattern.REQUEST_RESPONSE, + sfn.IntegrationPattern.RUN_JOB, + ]; + + protected readonly taskMetrics?: sfn.TaskMetricsConfig; + protected readonly taskPolicies?: iam.PolicyStatement[]; + + private readonly integrationPattern: sfn.IntegrationPattern; + + constructor(scope: cdk.Construct, id: string, private readonly props: CodeBuildStartBuildProps) { + super(scope, id, props); + this.integrationPattern = props.integrationPattern ?? sfn.IntegrationPattern.REQUEST_RESPONSE; + + validatePatternSupported(this.integrationPattern, CodeBuildStartBuild.SUPPORTED_INTEGRATION_PATTERNS); + + this.taskMetrics = { + metricPrefixSingular: 'CodeBuildProject', + metricPrefixPlural: 'CodeBuildProjects', + metricDimensions: { + ProjectArn: this.props.project.projectArn, + }, + }; + + this.taskPolicies = this.configurePolicyStatements(); + } + + private configurePolicyStatements(): iam.PolicyStatement[] { + let policyStatements = [ + new iam.PolicyStatement({ + resources: [this.props.project.projectArn], + actions: [ + 'codebuild:StartBuild', + 'codebuild:StopBuild', + ], + }), + ]; + + if (this.integrationPattern === sfn.IntegrationPattern.RUN_JOB) { + policyStatements.push( + new iam.PolicyStatement({ + actions: ['events:PutTargets', 'events:PutRule', 'events:DescribeRule'], + resources: [ + cdk.Stack.of(this).formatArn({ + service: 'events', + resource: 'rule/StepFunctionsGetEventForCodeBuildStartBuildRule', + }), + ], + }), + ); + } + + return policyStatements; + } + + /** + * Provides the CodeBuild StartBuild service integration task configuration + */ + /** + * @internal + */ + protected _renderTask(): any { + return { + Resource: integrationResourceArn('codebuild', 'startBuild', this.integrationPattern), + Parameters: sfn.FieldUtils.renderObject({ + ProjectName: this.props.project.projectName, + EnvironmentVariablesOverride: this.props.environmentVariablesOverride + ? this.serializeEnvVariables(this.props.environmentVariablesOverride) + : undefined, + }), + }; + } + + private serializeEnvVariables(environmentVariables: { [name: string]: codebuild.BuildEnvironmentVariable }) { + return Object.keys(environmentVariables).map(name => ({ + Name: name, + Type: environmentVariables[name].type || codebuild.BuildEnvironmentVariableType.PLAINTEXT, + Value: environmentVariables[name].value, + })); + } +} diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/index.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/index.ts index ee034e389ad96..a0e97e9df77ca 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/index.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/index.ts @@ -34,3 +34,4 @@ export * from './dynamodb/put-item'; export * from './dynamodb/update-item'; export * from './dynamodb/delete-item'; export * from './dynamodb/shared-types'; +export * from './codebuild/start-build'; diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 6196dd98e9a72..822215fd74708 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -71,6 +71,7 @@ "@aws-cdk/assets": "0.0.0", "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", + "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-dynamodb": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-ecr": "0.0.0", @@ -92,6 +93,7 @@ "@aws-cdk/assets": "0.0.0", "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", + "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-dynamodb": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-ecr": "0.0.0", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json new file mode 100644 index 0000000000000..9720f657969e2 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.expected.json @@ -0,0 +1,259 @@ +{ + "Resources": { + "ProjectRole4CCB274E": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": "codebuild.amazonaws.com" + } + } + ], + "Version": "2012-10-17" + } + } + }, + "ProjectRoleDefaultPolicy7F29461B": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:CreateLogGroup", + "logs:CreateLogStream", + "logs:PutLogEvents" + ], + "Effect": "Allow", + "Resource": [ + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "ProjectC78D97AD" + } + ] + ] + }, + { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":logs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":log-group:/aws/codebuild/", + { + "Ref": "ProjectC78D97AD" + }, + ":*" + ] + ] + } + ] + }, + { + "Action": [ + "codebuild:CreateReportGroup", + "codebuild:CreateReport", + "codebuild:UpdateReport", + "codebuild:BatchPutTestCases" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":codebuild:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":report-group/", + { + "Ref": "ProjectC78D97AD" + }, + "-*" + ] + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "ProjectRoleDefaultPolicy7F29461B", + "Roles": [ + { + "Ref": "ProjectRole4CCB274E" + } + ] + } + }, + "ProjectC78D97AD": { + "Type": "AWS::CodeBuild::Project", + "Properties": { + "Artifacts": { + "Type": "NO_ARTIFACTS" + }, + "Environment": { + "ComputeType": "BUILD_GENERAL1_SMALL", + "EnvironmentVariables": [ + { + "Name": "zone", + "Type": "PLAINTEXT", + "Value": "defaultZone" + } + ], + "Image": "aws/codebuild/standard:1.0", + "PrivilegedMode": false, + "Type": "LINUX_CONTAINER" + }, + "ServiceRole": { + "Fn::GetAtt": [ + "ProjectRole4CCB274E", + "Arn" + ] + }, + "Source": { + "BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}", + "Type": "NO_SOURCE" + }, + "Name": "MyTestProject" + } + }, + "StateMachineRoleB840431D": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Action": "sts:AssumeRole", + "Effect": "Allow", + "Principal": { + "Service": { + "Fn::Join": [ + "", + [ + "states.", + { + "Ref": "AWS::Region" + }, + ".amazonaws.com" + ] + ] + } + } + } + ], + "Version": "2012-10-17" + } + } + }, + "StateMachineRoleDefaultPolicyDF1E6607": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "codebuild:StartBuild", + "codebuild:StopBuild" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "ProjectC78D97AD", + "Arn" + ] + } + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "StateMachineRoleDefaultPolicyDF1E6607", + "Roles": [ + { + "Ref": "StateMachineRoleB840431D" + } + ] + } + }, + "StateMachine2E01A3A5": { + "Type": "AWS::StepFunctions::StateMachine", + "Properties": { + "RoleArn": { + "Fn::GetAtt": [ + "StateMachineRoleB840431D", + "Arn" + ] + }, + "DefinitionString": { + "Fn::Join": [ + "", + [ + "{\"StartAt\":\"Start\",\"States\":{\"Start\":{\"Type\":\"Pass\",\"Result\":{\"bar\":\"SomeValue\"},\"Next\":\"build-task\"},\"build-task\":{\"End\":true,\"Type\":\"Task\",\"Resource\":\"arn:", + { + "Ref": "AWS::Partition" + }, + ":states:::codebuild:startBuild\",\"Parameters\":{\"ProjectName\":\"", + { + "Ref": "ProjectC78D97AD" + }, + "\",\"EnvironmentVariablesOverride\":[{\"Name\":\"ZONE\",\"Type\":\"PLAINTEXT\",\"Value.$\":\"$.envVariables.zone\"}]}}}}" + ] + ] + } + }, + "DependsOn": [ + "StateMachineRoleDefaultPolicyDF1E6607", + "StateMachineRoleB840431D" + ] + } + }, + "Outputs": { + "ProjectName": { + "Value": { + "Ref": "ProjectC78D97AD" + } + }, + "StateMachineArn": { + "Value": { + "Ref": "StateMachine2E01A3A5" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.ts new file mode 100644 index 0000000000000..bf33a46907833 --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/integ.start-build.ts @@ -0,0 +1,68 @@ +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; +import * as cdk from '@aws-cdk/core'; +import * as tasks from '../../lib'; + +/* + * Stack verification steps: + * * aws stepfunctions start-execution --state-machine-arn : should return execution arn + * * aws codebuild list-builds-for-project --project-name : should return a list of projects with size greater than 0 + * * + * * aws codebuild batch-get-builds --ids --query 'builds[0].buildStatus': wait until the status is 'SUCCEEDED' + * * aws stepfunctions describe-execution --execution-arn --query 'status': should return status as SUCCEEDED + */ + +class StartBuildStack extends cdk.Stack { + constructor(scope: cdk.App, id: string, props: cdk.StackProps = {}) { + super(scope, id, props); + + let project = new codebuild.Project(this, 'Project', { + projectName: 'MyTestProject', + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + build: { + commands: [ + 'echo "Hello, CodeBuild!"', + ], + }, + }, + }), + environmentVariables: { + zone: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: 'defaultZone', + }, + }, + }); + + let startBuild = new tasks.CodeBuildStartBuild(this, 'build-task', { + project: project, + environmentVariablesOverride: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), + }, + }, + }); + + const definition = new sfn.Pass(this, 'Start', { + result: sfn.Result.fromObject({ bar: 'SomeValue' }), + }).next(startBuild); + + const stateMachine = new sfn.StateMachine(this, 'StateMachine', { + definition, + }); + + new cdk.CfnOutput(this, 'ProjectName', { + value: project.projectName, + }); + new cdk.CfnOutput(this, 'StateMachineArn', { + value: stateMachine.stateMachineArn, + }); + } +} + +const app = new cdk.App(); +new StartBuildStack(app, 'aws-stepfunctions-tasks-codebuild-start-build-integ'); +app.synth(); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts new file mode 100644 index 0000000000000..0c71117392c5e --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/codebuild/start-build.test.ts @@ -0,0 +1,157 @@ +import * as codebuild from '@aws-cdk/aws-codebuild'; +import * as sfn from '@aws-cdk/aws-stepfunctions'; +import * as cdk from '@aws-cdk/core'; +import { CodeBuildStartBuild } from '../../lib'; + +let stack: cdk.Stack; +let codebuildProject: codebuild.Project; + +beforeEach(() => { + // GIVEN + stack = new cdk.Stack(); + + codebuildProject = new codebuild.Project(stack, 'Project', { + projectName: 'MyTestProject', + buildSpec: codebuild.BuildSpec.fromObject({ + version: '0.2', + phases: { + build: { + commands: [ + 'echo "Hello, CodeBuild!"', + ], + }, + }, + }), + }); +}); + +test('Task with only the required parameters', () => { + // WHEN + const task = new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::codebuild:startBuild.sync', + ], + ], + }, + End: true, + Parameters: { + ProjectName: { + Ref: 'ProjectC78D97AD', + }, + }, + }); +}); + +test('Task with all the parameters', () => { + // WHEN + const task = new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + environmentVariablesOverride: { + env: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: 'prod', + }, + }, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::codebuild:startBuild.sync', + ], + ], + }, + End: true, + Parameters: { + ProjectName: { + Ref: 'ProjectC78D97AD', + }, + EnvironmentVariablesOverride: [ + { + Name: 'env', + Type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + Value: 'prod', + }, + ], + }, + }); +}); + +test('supports tokens', () => { + // WHEN + const task = new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.RUN_JOB, + environmentVariablesOverride: { + ZONE: { + type: codebuild.BuildEnvironmentVariableType.PLAINTEXT, + value: sfn.JsonPath.stringAt('$.envVariables.zone'), + }, + }, + }); + + // THEN + expect(stack.resolve(task.toStateJson())).toEqual({ + Type: 'Task', + Resource: { + 'Fn::Join': [ + '', + [ + 'arn:', + { + Ref: 'AWS::Partition', + }, + ':states:::codebuild:startBuild.sync', + ], + ], + }, + End: true, + Parameters: { + ProjectName: { + Ref: 'ProjectC78D97AD', + }, + EnvironmentVariablesOverride: [ + { + 'Name': 'ZONE', + 'Type': codebuild.BuildEnvironmentVariableType.PLAINTEXT, + 'Value.$': '$.envVariables.zone', + }, + ], + }, + }); +}); + + +test('Task throws if WAIT_FOR_TASK_TOKEN is supplied as service integration pattern', () => { + expect(() => { + new CodeBuildStartBuild(stack, 'Task', { + project: codebuildProject, + integrationPattern: sfn.IntegrationPattern.WAIT_FOR_TASK_TOKEN, + }); + }).toThrow( + /Unsupported service integration pattern. Supported Patterns: REQUEST_RESPONSE,RUN_JOB. Received: WAIT_FOR_TASK_TOKEN/, + ); +}); From d5e1ba92974288d876fcf9c0cfa24a7798bed384 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Fri, 21 Aug 2020 22:33:23 +0100 Subject: [PATCH 14/42] chore(s3-deployment): update README to delineate the CloudFront options (#9893) The existing `CloudFrontWebDistribution` construct needs to be configured quite differently depending on whether the backing bucket is configured for website hosting or not; this can lead to confusion and incorrect results if the wrong origin type is used. This doc update explicitly calls out the different options, including the newer experimental construct that hides this complexity entirely. fixes #7434 ---- *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-deployment/README.md | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-s3-deployment/README.md b/packages/@aws-cdk/aws-s3-deployment/README.md index 2f4dbe82cb0ba..9c922719e5e96 100644 --- a/packages/@aws-cdk/aws-s3-deployment/README.md +++ b/packages/@aws-cdk/aws-s3-deployment/README.md @@ -1,4 +1,5 @@ ## AWS S3 Deployment Construct Library + --- @@ -145,9 +146,30 @@ new s3deploy.BucketDeployment(this, 'DeployWebsite', { You can provide a CloudFront distribution and optional paths to invalidate after the bucket deployment finishes. ```ts +import * as cloudfront from '@aws-cdk/aws-cloudfront'; +import * as origins from '@aws-cdk/aws-cloudfront-origins'; + const bucket = new s3.Bucket(this, 'Destination'); -const distribution = new cloudfront.CloudFrontWebDistribution(this, 'Distribution', { +// Option 1 (Experimental): Handles buckets whether or not they are configured for website hosting. +const distribution = new cloudfront.Distribution(this, 'Distribution', { + defaultBehavior: { origin: new origins.S3Origin(bucket) }, +}); + +// Option 2 (Stable): Use this if the bucket has website hosting enabled. +const distribution_for_website_bucket = new cloudfront.CloudFrontWebDistribution(this, 'DistributionForWebBucket', { + originConfigs: [ + { + customOriginSource: { + domainName: bucket.bucketWebsiteDomainName, + }, + behaviors : [ {isDefaultBehavior: true}] + } + ] +}); + +// Option 3 (Stable): Use this version if the bucket does not have website hosting enabled. +const distribution_for_bucket = new cloudfront.CloudFrontWebDistribution(this, 'DistributionForBucket', { originConfigs: [ { s3OriginSource: { @@ -161,7 +183,7 @@ const distribution = new cloudfront.CloudFrontWebDistribution(this, 'Distributio new s3deploy.BucketDeployment(this, 'DeployWithInvalidation', { sources: [s3deploy.Source.asset('./website-dist')], destinationBucket: bucket, - distribution, + distribution, // or distribution_for_website_bucket or distribution_for_bucket distributionPaths: ['/images/*.png'], }); ``` From 65fd3e66ab3817f7e5051c5a8ae3c13b65415f63 Mon Sep 17 00:00:00 2001 From: David Sung Date: Sat, 22 Aug 2020 06:06:30 +0800 Subject: [PATCH 15/42] feat(eks): envelope encryption for secrets (#9438) feat(eks): envelope encryption for secrets This PR adds envelope encryption support for Amazon EKS. Added a new key `secretsEncryptionKey` in `ClusterProps` for users to specify their own KMS CMK upon cluster creation: ```ts new eks.Cluster(this, 'Cluster', { version: eks.KubernetesVersion.V1_16, secretsEncryptionKey, }); ``` Closes: #9140 ---- ## Considerations 1. Confirmed `Secrets Encryption` is enabled in the provisioned Amazon EKS (both standard resource `AWS::EKS::Cluster` and custom resource `Custom::AWSCDK-EKS-Cluster`) after running an integration test from scratch. 2. By inspecting the CloudTrail logs after the integration test, confirmed the exact KMS IAM permission required for the cluster creation role as `['kms:Encrypt', 'kms:Decrypt', 'kms:DescribeKey', 'kms:CreateGrant']`. Note: The encryption provider is using its own way to generate data encryption key, not using KMS GenerateDataKey, and hence IAM permission`kms:GenerateDataKey*` is not required. ---- *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-eks/README.md | 13 ++ .../lib/cluster-resource-handler/cluster.ts | 10 + packages/@aws-cdk/aws-eks/lib/cluster.ts | 32 +++ .../@aws-cdk/aws-eks/lib/legacy-cluster.ts | 18 ++ packages/@aws-cdk/aws-eks/package.json | 2 + .../test/integ.eks-cluster.expected.json | 185 +++++++++++++----- ...eks-cluster.kubectl-disabled.expected.json | 62 ++++++ .../integ.eks-cluster.kubectl-disabled.ts | 4 + .../aws-eks/test/integ.eks-cluster.ts | 10 +- .../test/test.cluster-resource-provider.ts | 43 ++++ .../@aws-cdk/aws-eks/test/test.cluster.ts | 30 +++ .../aws-eks/test/test.legacy-cluster.ts | 30 +++ 12 files changed, 381 insertions(+), 58 deletions(-) diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index 649f881102fed..f99d88f2fde9c 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -477,6 +477,19 @@ Kubernetes secrets using the AWS Key Management Service (AWS KMS) can be enabled on [creating a cluster](https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html) can provide more details about the customer master key (CMK) that can be used for the encryption. +You can use the `secretsEncryptionKey` to configure which key the cluster will use to encrypt Kubernetes secrets. By default, an AWS Managed key will be used. + +> This setting can only be specified when the cluster is created and cannot be updated. + + +```ts +const secretsKey = new kms.Key(this, 'SecretsKey'); +const cluster = new eks.Cluster(this, 'MyCluster', { + secretsEncryptionKey: secretsKey, + // ... +}); +``` + The Amazon Resource Name (ARN) for that CMK can be retrieved. ```ts diff --git a/packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts index b69e9db8c35bc..d11a0a04f7233 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster-resource-handler/cluster.ts @@ -105,6 +105,11 @@ export class ClusterResourceHandler extends ResourceHandler { const updates = analyzeUpdate(this.oldProps, this.newProps); console.log('onUpdate:', JSON.stringify({ updates }, undefined, 2)); + // updates to encryption config is not supported + if (updates.updateEncryption) { + throw new Error('Cannot update cluster encryption configuration'); + } + // if there is an update that requires replacement, go ahead and just create // a new cluster with the new config. The old cluster will automatically be // deleted by cloudformation upon success. @@ -287,8 +292,10 @@ interface UpdateMap { replaceName: boolean; // name replaceVpc: boolean; // resourcesVpcConfig.subnetIds and securityGroupIds replaceRole: boolean; // roleArn + updateVersion: boolean; // version updateLogging: boolean; // logging + updateEncryption: boolean; // encryption (cannot be updated) updateAccess: boolean; // resourcesVpcConfig.endpointPrivateAccess and endpointPublicAccess } @@ -301,6 +308,8 @@ function analyzeUpdate(oldProps: Partial, newProps const oldPublicAccessCidrs = new Set(oldVpcProps.publicAccessCidrs ?? []); const newPublicAccessCidrs = new Set(newVpcProps.publicAccessCidrs ?? []); + const newEnc = newProps.encryptionConfig || { }; + const oldEnc = oldProps.encryptionConfig || { }; return { replaceName: newProps.name !== oldProps.name, @@ -313,6 +322,7 @@ function analyzeUpdate(oldProps: Partial, newProps !setsEqual(newPublicAccessCidrs, oldPublicAccessCidrs), replaceRole: newProps.roleArn !== oldProps.roleArn, updateVersion: newProps.version !== oldProps.version, + updateEncryption: JSON.stringify(newEnc) !== JSON.stringify(oldEnc), updateLogging: JSON.stringify(newProps.logging) !== JSON.stringify(oldProps.logging), }; } diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 7db245a814efb..fa1fa36df110b 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import * as ssm from '@aws-cdk/aws-ssm'; import { CfnOutput, CfnResource, Construct, IResource, Resource, Stack, Tags, Token, Duration } from '@aws-cdk/core'; import * as YAML from 'yaml'; @@ -379,6 +380,15 @@ export interface ClusterProps extends ClusterOptions { * @default NODEGROUP */ readonly defaultCapacityType?: DefaultCapacityType; + + /** + * KMS secret for envelope encryption for Kubernetes secrets. + * + * @default - By default, Kubernetes stores all secret object data within etcd and + * all etcd volumes used by Amazon EKS are encrypted at the disk-level + * using AWS-Managed encryption keys. + */ + readonly secretsEncryptionKey?: kms.IKey; } /** @@ -630,6 +640,14 @@ export class Cluster extends Resource implements ICluster { securityGroupIds: [securityGroup.securityGroupId], subnetIds, }, + ...(props.secretsEncryptionKey ? { + encryptionConfig: [{ + provider: { + keyArn: props.secretsEncryptionKey.keyArn, + }, + resources: ['secrets'], + }], + } : {} ), }; this.endpointAccess = props.endpointAccess ?? EndpointAccess.PUBLIC_AND_PRIVATE; @@ -671,6 +689,20 @@ export class Cluster extends Resource implements ICluster { })], })); + // grant cluster creation role sufficient permission to access the specified key + // see https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html + if (props.secretsEncryptionKey) { + this._clusterResource.creationRole.addToPolicy(new iam.PolicyStatement({ + actions: [ + 'kms:Encrypt', + 'kms:Decrypt', + 'kms:DescribeKey', + 'kms:CreateGrant', + ], + resources: [props.secretsEncryptionKey.keyArn], + })); + } + // we use an SSM parameter as a barrier because it's free and fast. this._kubectlReadyBarrier = new CfnResource(this, 'KubectlReadyBarrier', { type: 'AWS::SSM::Parameter', diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index 7aec7be0cd693..58d4bd425a919 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -1,6 +1,7 @@ import * as autoscaling from '@aws-cdk/aws-autoscaling'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import * as ssm from '@aws-cdk/aws-ssm'; import { CfnOutput, Construct, Resource, Stack, Token, Tags } from '@aws-cdk/core'; import { ICluster, ClusterAttributes, KubernetesVersion, NodeType, DefaultCapacityType, EksOptimizedImage, CapacityOptions, MachineImageType, AutoScalingGroupOptions, CommonClusterOptions } from './cluster'; @@ -43,6 +44,15 @@ export interface LegacyClusterProps extends CommonClusterOptions { * @default NODEGROUP */ readonly defaultCapacityType?: DefaultCapacityType; + + /** + * KMS secret for envelope encryption for Kubernetes secrets. + * + * @default - By default, Kubernetes stores all secret object data within etcd and + * all etcd volumes used by Amazon EKS are encrypted at the disk-level + * using AWS-Managed encryption keys. + */ + readonly secretsEncryptionKey?: kms.IKey; } /** @@ -184,6 +194,14 @@ export class LegacyCluster extends Resource implements ICluster { securityGroupIds: [securityGroup.securityGroupId], subnetIds, }, + ...(props.secretsEncryptionKey ? { + encryptionConfig: [{ + provider: { + keyArn: props.secretsEncryptionKey.keyArn, + }, + resources: ['secrets'], + }], + } : {} ), }; const resource = new CfnCluster(this, 'Resource', clusterProps); diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 4e5d793058cf8..24426f0acb0d1 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -77,6 +77,7 @@ "@aws-cdk/aws-autoscaling": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", @@ -92,6 +93,7 @@ "@aws-cdk/aws-autoscaling": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index 62e1e78b850c1..c6ad064928fc6 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -28,6 +28,53 @@ } } }, + "SecretsKey317DCF94": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": [ + "kms:Create*", + "kms:Describe*", + "kms:Enable*", + "kms:List*", + "kms:Put*", + "kms:Update*", + "kms:Revoke*", + "kms:Disable*", + "kms:Get*", + "kms:Delete*", + "kms:ScheduleKeyDeletion", + "kms:CancelKeyDeletion", + "kms:GenerateDataKey", + "kms:TagResource", + "kms:UntagResource" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::12345678:root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, "Vpc8378EB38": { "Type": "AWS::EC2::VPC", "Properties": { @@ -856,6 +903,21 @@ ] } }, + { + "Action": [ + "kms:Encrypt", + "kms:Decrypt", + "kms:DescribeKey", + "kms:CreateGrant" + ], + "Effect": "Allow", + "Resource": { + "Fn::GetAtt": [ + "SecretsKey317DCF94", + "Arn" + ] + } + }, { "Action": "iam:PassRole", "Effect": "Allow", @@ -926,6 +988,21 @@ "Arn" ] }, + "encryptionConfig": [ + { + "provider": { + "keyArn": { + "Fn::GetAtt": [ + "SecretsKey317DCF94", + "Arn" + ] + } + }, + "resources": [ + "secrets" + ] + } + ], "resourcesVpcConfig": { "subnetIds": [ { @@ -2909,7 +2986,7 @@ }, "/", { - "Ref": "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1S3BucketC7BC4682" + "Ref": "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfS3Bucket9C877664" }, "/", { @@ -2919,7 +2996,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1S3VersionKeyEFC9702C" + "Ref": "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfS3VersionKeyD136CE00" } ] } @@ -2932,7 +3009,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1S3VersionKeyEFC9702C" + "Ref": "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfS3VersionKeyD136CE00" } ] } @@ -2942,17 +3019,17 @@ ] }, "Parameters": { - "referencetoawscdkeksclustertestAssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3Bucket49014916Ref": { - "Ref": "AssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3BucketAEF9EB6C" + "referencetoawscdkeksclustertestAssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3BucketAAB1A713Ref": { + "Ref": "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3Bucket086F94BB" }, - "referencetoawscdkeksclustertestAssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3VersionKey2D51245BRef": { - "Ref": "AssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3VersionKey912C763C" + "referencetoawscdkeksclustertestAssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKey481F0807Ref": { + "Ref": "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKeyA4B5C598" }, - "referencetoawscdkeksclustertestAssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketA9A24CF5Ref": { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketF1BD2256" + "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3Bucket85526CA7Ref": { + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" }, - "referencetoawscdkeksclustertestAssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKey6036F880Ref": { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKeyF47FA401" + "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey46BA60C1Ref": { + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" } } } @@ -2970,7 +3047,7 @@ }, "/", { - "Ref": "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eS3BucketB126CD55" + "Ref": "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892S3Bucket55EC5E2E" }, "/", { @@ -2980,7 +3057,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eS3VersionKey6DD5D685" + "Ref": "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892S3VersionKey4D11177E" } ] } @@ -2993,7 +3070,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eS3VersionKey6DD5D685" + "Ref": "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892S3VersionKey4D11177E" } ] } @@ -3009,11 +3086,11 @@ "referencetoawscdkeksclustertestAssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3VersionKey901D947ARef": { "Ref": "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3VersionKey40FF2C4A" }, - "referencetoawscdkeksclustertestAssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketA9A24CF5Ref": { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketF1BD2256" + "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3Bucket85526CA7Ref": { + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" }, - "referencetoawscdkeksclustertestAssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKey6036F880Ref": { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKeyF47FA401" + "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey46BA60C1Ref": { + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" } } } @@ -3144,7 +3221,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3S3BucketB6A9971A" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880" }, "S3Key": { "Fn::Join": [ @@ -3157,7 +3234,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3S3VersionKey08BBD845" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" } ] } @@ -3170,7 +3247,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3S3VersionKey08BBD845" + "Ref": "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4" } ] } @@ -3413,7 +3490,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketF1BD2256" + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" }, "S3Key": { "Fn::Join": [ @@ -3426,7 +3503,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKeyF47FA401" + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" } ] } @@ -3439,7 +3516,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKeyF47FA401" + "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" } ] } @@ -3600,29 +3677,29 @@ } }, "Parameters": { - "AssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3BucketAEF9EB6C": { + "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3Bucket086F94BB": { "Type": "String", - "Description": "S3 bucket for asset \"1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3\"" + "Description": "S3 bucket for asset \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" }, - "AssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3S3VersionKey912C763C": { + "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKeyA4B5C598": { "Type": "String", - "Description": "S3 key for asset version \"1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3\"" + "Description": "S3 key for asset version \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" }, - "AssetParameters1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3ArtifactHashD59B0951": { + "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4ArtifactHash9B26D532": { "Type": "String", - "Description": "Artifact hash for asset \"1ea72e469c0d3a62f2500d1c42aa05a5034a518637239066718928d7e6f748d3\"" + "Description": "Artifact hash for asset \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" }, - "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3BucketF1BD2256": { + "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90": { "Type": "String", - "Description": "S3 bucket for asset \"974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74c\"" + "Description": "S3 bucket for asset \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" }, - "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cS3VersionKeyF47FA401": { + "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5": { "Type": "String", - "Description": "S3 key for asset version \"974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74c\"" + "Description": "S3 key for asset version \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" }, - "AssetParameters974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74cArtifactHash5C0B1EA0": { + "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1ArtifactHashAA0236EE": { "Type": "String", - "Description": "Artifact hash for asset \"974a6fb29abbd1d98fce56346da3743e79277f0f52e0e2cdf3f1867ac5b1e74c\"" + "Description": "Artifact hash for asset \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" }, "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3Bucket9ABBD5A2": { "Type": "String", @@ -3648,17 +3725,17 @@ "Type": "String", "Description": "Artifact hash for asset \"952bd1c03e8201c4c1c67d6de0f3fdaaf88fda05f89a1232c3f6364343cd5344\"" }, - "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3S3BucketB6A9971A": { + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3Bucket14156880": { "Type": "String", - "Description": "S3 bucket for asset \"eb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3\"" + "Description": "S3 bucket for asset \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" }, - "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3S3VersionKey08BBD845": { + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deS3VersionKey5225BCA4": { "Type": "String", - "Description": "S3 key for asset version \"eb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3\"" + "Description": "S3 key for asset version \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" }, - "AssetParameterseb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3ArtifactHashADF25EB1": { + "AssetParametersb075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0deArtifactHashC509349A": { "Type": "String", - "Description": "Artifact hash for asset \"eb7a9b73a02dcd848325fc3abc22c1923c364d7480e06bd68a337dc3f33143d3\"" + "Description": "Artifact hash for asset \"b075459e6bf309093fbd4b9a9e576a5f172b91c14d84eedb0f069566f6abb0de\"" }, "AssetParameters2acc31b34c05692ab3ea9831a27e5f241cffb21857e633d8256b8f0ebf5f3f43S3BucketB43AFE04": { "Type": "String", @@ -3672,29 +3749,29 @@ "Type": "String", "Description": "Artifact hash for asset \"2acc31b34c05692ab3ea9831a27e5f241cffb21857e633d8256b8f0ebf5f3f43\"" }, - "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1S3BucketC7BC4682": { + "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfS3Bucket9C877664": { "Type": "String", - "Description": "S3 bucket for asset \"63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1\"" + "Description": "S3 bucket for asset \"6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5df\"" }, - "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1S3VersionKeyEFC9702C": { + "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfS3VersionKeyD136CE00": { "Type": "String", - "Description": "S3 key for asset version \"63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1\"" + "Description": "S3 key for asset version \"6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5df\"" }, - "AssetParameters63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1ArtifactHash36EF9FF1": { + "AssetParameters6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5dfArtifactHash95C25BEB": { "Type": "String", - "Description": "Artifact hash for asset \"63d6ca207248ed16c522293c00ba826669cf96470fc3eac8707647d8d0877ac1\"" + "Description": "Artifact hash for asset \"6ecca35abf6e120e05482cd9c32ba6b63ca36c403162c80cac6aa3af3f69d5df\"" }, - "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eS3BucketB126CD55": { + "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892S3Bucket55EC5E2E": { "Type": "String", - "Description": "S3 bucket for asset \"2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364e\"" + "Description": "S3 bucket for asset \"c5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892\"" }, - "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eS3VersionKey6DD5D685": { + "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892S3VersionKey4D11177E": { "Type": "String", - "Description": "S3 key for asset version \"2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364e\"" + "Description": "S3 key for asset version \"c5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892\"" }, - "AssetParameters2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364eArtifactHash70870D76": { + "AssetParametersc5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892ArtifactHash1733F1C4": { "Type": "String", - "Description": "Artifact hash for asset \"2d77caab030d62f3e59ed7da4715b9f1ad594235c93aa3b21e9a31ec7cf8364e\"" + "Description": "Artifact hash for asset \"c5632c43ffe4f4e631b88fb1e6ba409c43088afcd9a566a1d2d59fcbb6a13892\"" }, "SsmParameterValueawsserviceeksoptimizedami116amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.expected.json index 8b055a913524d..7d8d3e659bd0d 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.expected.json @@ -586,6 +586,53 @@ } } }, + "SecretsKey317DCF94": { + "Type": "AWS::KMS::Key", + "Properties": { + "KeyPolicy": { + "Statement": [ + { + "Action": [ + "kms:Create*", + "kms:Describe*", + "kms:Enable*", + "kms:List*", + "kms:Put*", + "kms:Update*", + "kms:Revoke*", + "kms:Disable*", + "kms:Get*", + "kms:Delete*", + "kms:ScheduleKeyDeletion", + "kms:CancelKeyDeletion", + "kms:GenerateDataKey", + "kms:TagResource", + "kms:UntagResource" + ], + "Effect": "Allow", + "Principal": { + "AWS": { + "Fn::Join": [ + "", + [ + "arn:", + { + "Ref": "AWS::Partition" + }, + ":iam::12345678:root" + ] + ] + } + }, + "Resource": "*" + } + ], + "Version": "2012-10-17" + } + }, + "UpdateReplacePolicy": "Retain", + "DeletionPolicy": "Retain" + }, "EKSClusterRoleC0AEAC3D": { "Type": "AWS::IAM::Role", "Properties": { @@ -693,6 +740,21 @@ "Arn" ] }, + "EncryptionConfig": [ + { + "Provider": { + "KeyArn": { + "Fn::GetAtt": [ + "SecretsKey317DCF94", + "Arn" + ] + } + }, + "Resources": [ + "secrets" + ] + } + ], "Version": "1.16" } }, diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.ts index eaf0dfa1c5e9e..81a749fef2c93 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.kubectl-disabled.ts @@ -1,4 +1,5 @@ import * as ec2 from '@aws-cdk/aws-ec2'; +import * as kms from '@aws-cdk/aws-kms'; import * as cdk from '@aws-cdk/core'; import * as eks from '../lib'; import { TestStack } from './util'; @@ -9,10 +10,13 @@ class EksClusterStack extends TestStack { const vpc = new ec2.Vpc(this, 'VPC'); + const secretsEncryptionKey = new kms.Key(this, 'SecretsKey'); + const cluster = new eks.LegacyCluster(this, 'EKSCluster', { vpc, defaultCapacity: 0, version: eks.KubernetesVersion.V1_16, + secretsEncryptionKey, }); cluster.addCapacity('Nodes', { diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts index 30bd5144a2015..f4405b8f6913a 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts @@ -1,6 +1,7 @@ /// !cdk-integ pragma:ignore-assets import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; +import * as kms from '@aws-cdk/aws-kms'; import { App, CfnOutput, Duration, Token } from '@aws-cdk/core'; import * as eks from '../lib'; import * as hello from './hello-k8s'; @@ -20,6 +21,8 @@ class EksClusterStack extends TestStack { assumedBy: new iam.AccountRootPrincipal(), }); + const secretsEncryptionKey = new kms.Key(this, 'SecretsKey'); + // just need one nat gateway to simplify the test this.vpc = new ec2.Vpc(this, 'Vpc', { maxAzs: 3, natGateways: 1 }); @@ -29,6 +32,7 @@ class EksClusterStack extends TestStack { mastersRole, defaultCapacity: 2, version: eks.KubernetesVersion.V1_16, + secretsEncryptionKey, }); this.assertFargateProfile(); @@ -217,12 +221,10 @@ class EksClusterStack extends TestStack { } } -// this test uses the bottlerocket image, which is only supported in these +// this test uses both the bottlerocket image and the inf1 instance, which are only supported in these // regions. see https://github.com/aws/aws-cdk/tree/master/packages/%40aws-cdk/aws-eks#bottlerocket +// and https://aws.amazon.com/about-aws/whats-new/2019/12/introducing-amazon-ec2-inf1-instances-high-performance-and-the-lowest-cost-machine-learning-inference-in-the-cloud/ const supportedRegions = [ - 'ap-northeast-1', - 'ap-south-1', - 'eu-central-1', 'us-east-1', 'us-west-2', ]; diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster-resource-provider.ts b/packages/@aws-cdk/aws-eks/test/test.cluster-resource-provider.ts index be381ddd996e3..1e0438905917d 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster-resource-provider.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster-resource-provider.ts @@ -132,6 +132,27 @@ export = { test.done(); }, + async 'encryption config'(test: Test) { + const handler = new ClusterResourceHandler(mocks.client, mocks.newRequest('Create', { + ...mocks.MOCK_PROPS, + encryptionConfig: [{ provider: { keyArn: 'aws:kms:key' }, resources: ['secrets'] }], + })); + + await handler.onEvent(); + + test.deepEqual(mocks.actualRequest.createClusterRequest, { + roleArn: 'arn:of:role', + resourcesVpcConfig: { + subnetIds: ['subnet1', 'subnet2'], + securityGroupIds: ['sg1', 'sg2', 'sg3'], + }, + encryptionConfig: [{ provider: { keyArn: 'aws:kms:key' }, resources: ['secrets'] }], + name: 'MyResourceId-fakerequestid', + }); + + test.done(); + }, + }, delete: { @@ -381,6 +402,28 @@ export = { }, }, + async 'encryption config cannot be updated'(test: Test) { + // GIVEN + const handler = new ClusterResourceHandler(mocks.client, mocks.newRequest('Update', { + encryptionConfig: [{ resources: ['secrets'], provider: { keyArn: 'key:arn:1' } }], + }, { + encryptionConfig: [{ resources: ['secrets'], provider: { keyArn: 'key:arn:2' } }], + })); + + // WHEN + let error; + try { + await handler.onEvent(); + } catch (e) { + error = e; + } + + // THEN + test.ok(error); + test.equal(error.message, 'Cannot update cluster encryption configuration'); + test.done(); + }, + 'isUpdateComplete with EKS update ID': { async 'with "Failed" status'(test: Test) { diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index c5f0048150f5a..9f7de1738d000 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -3,6 +3,7 @@ import * as path from 'path'; import { countResources, expect, haveResource, haveResourceLike } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; 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 * as YAML from 'yaml'; @@ -1838,4 +1839,33 @@ export = { test.deepEqual(rawTemplate.Outputs.LoadBalancerAddress.Value, { 'Fn::GetAtt': [expectedKubernetesGetId, 'Value'] }); test.done(); }, + 'create a cluster using custom resource with secrets encryption using KMS CMK'(test: Test) { + // GIVEN + const { stack, vpc } = testFixture(); + + // WHEN + new eks.Cluster(stack, 'Cluster', { + vpc, + version: CLUSTER_VERSION, + secretsEncryptionKey: new kms.Key(stack, 'Key'), + }); + + // THEN + expect(stack).to(haveResourceLike('Custom::AWSCDK-EKS-Cluster', { + Config: { + encryptionConfig: [{ + provider: { + keyArn: { + 'Fn::GetAtt': [ + 'Key961B73FD', + 'Arn', + ], + }, + }, + resources: ['secrets'], + }], + }, + })); + test.done(); + }, }; diff --git a/packages/@aws-cdk/aws-eks/test/test.legacy-cluster.ts b/packages/@aws-cdk/aws-eks/test/test.legacy-cluster.ts index f70827649b7ef..646a0e948ef00 100644 --- a/packages/@aws-cdk/aws-eks/test/test.legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.legacy-cluster.ts @@ -1,6 +1,7 @@ import { expect, haveResource, haveResourceLike, not } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; 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 * as eks from '../lib'; @@ -587,4 +588,33 @@ export = { test.done(); }, }, + + 'create a cluster with secrets encryption using KMS CMK'(test: Test) { + // GIVEN + const { stack, vpc } = testFixture(); + + // WHEN + new eks.LegacyCluster(stack, 'Cluster', { + vpc, + version: CLUSTER_VERSION, + secretsEncryptionKey: new kms.Key(stack, 'Key'), + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::EKS::Cluster', { + EncryptionConfig: [{ + Provider: { + KeyArn: { + 'Fn::GetAtt': [ + 'Key961B73FD', + 'Arn', + ], + }, + }, + Resources: ['secrets'], + }], + })); + + test.done(); + }, }; From 25a9cc7fabbe3b70add48edfd01421f74429b97f Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Fri, 21 Aug 2020 16:05:33 -0700 Subject: [PATCH 16/42] chore(appsync): clean up code and bugs for auth config (#9847) Added unit tests for default and additional auth config and cleaning up the code. Fixes: #9846 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 160 ++--- .../aws-appsync/test/appsync-apikey.test.ts | 206 ------ .../aws-appsync/test/appsync-auth.test.ts | 588 ++++++++++++++++++ .../test/appsync-code-first.test.ts | 18 +- .../aws-appsync/test/appsync-dynamodb.test.ts | 9 +- .../aws-appsync/test/appsync-grant.test.ts | 9 +- .../aws-appsync/test/appsync-http.test.ts | 9 +- .../aws-appsync/test/appsync-lambda.test.ts | 9 +- .../aws-appsync/test/appsync-none.test.ts | 18 +- .../aws-appsync/test/appsync-schema.test.ts | 34 +- .../@aws-cdk/aws-appsync/test/appsync.test.ts | 18 - 11 files changed, 678 insertions(+), 400 deletions(-) delete mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts create mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index 6155c41a3047b..f5f86d0077eda 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -260,7 +260,6 @@ export interface GraphQLApiProps { * @default - false */ readonly xrayEnabled?: boolean; - } /** @@ -409,51 +408,20 @@ export class GraphQLApi extends GraphqlApiBase { constructor(scope: Construct, id: string, props: GraphQLApiProps) { super(scope, id); - this.validateAuthorizationProps(props); - const defaultAuthorizationType = - props.authorizationConfig?.defaultAuthorization?.authorizationType ?? - AuthorizationType.API_KEY; - - let apiLogsRole; - if (props.logConfig) { - apiLogsRole = new Role(this, 'ApiLogsRole', { - assumedBy: new ServicePrincipal('appsync'), - }); - apiLogsRole.addManagedPolicy( - ManagedPolicy.fromAwsManagedPolicyName( - 'service-role/AWSAppSyncPushToCloudWatchLogs', - ), - ); - } + const defaultMode = props.authorizationConfig?.defaultAuthorization ?? + { authorizationType: AuthorizationType.API_KEY }; + const additionalModes = props.authorizationConfig?.additionalAuthorizationModes ?? []; + const modes = [defaultMode, ...additionalModes]; + + this.validateAuthorizationProps(modes); this.api = new CfnGraphQLApi(this, 'Resource', { name: props.name, - authenticationType: defaultAuthorizationType, - ...(props.logConfig && { - logConfig: { - cloudWatchLogsRoleArn: apiLogsRole ? apiLogsRole.roleArn : undefined, - excludeVerboseContent: props.logConfig.excludeVerboseContent, - fieldLogLevel: props.logConfig.fieldLogLevel - ? props.logConfig.fieldLogLevel.toString() - : undefined, - }, - }), - openIdConnectConfig: - props.authorizationConfig?.defaultAuthorization?.authorizationType === - AuthorizationType.OIDC - ? this.formatOpenIdConnectConfig( - props.authorizationConfig.defaultAuthorization - .openIdConnectConfig!, - ) - : undefined, - userPoolConfig: - props.authorizationConfig?.defaultAuthorization?.authorizationType === - AuthorizationType.USER_POOL - ? this.formatUserPoolConfig( - props.authorizationConfig.defaultAuthorization.userPoolConfig!, - ) - : undefined, - additionalAuthenticationProviders: this.formatAdditionalAuthenticationProviders(props), + authenticationType: defaultMode.authorizationType, + logConfig: this.setupLogConfig(props.logConfig), + openIdConnectConfig: this.setupOpenIdConnectConfig(defaultMode.openIdConnectConfig), + userPoolConfig: this.setupUserPoolConfig(defaultMode.userPoolConfig), + additionalAuthenticationProviders: this.setupAdditionalAuthorizationModes(additionalModes), xrayEnabled: props.xrayEnabled, }); @@ -464,19 +432,11 @@ export class GraphQLApi extends GraphqlApiBase { this.schemaMode = props.schemaDefinition; this.schema = this.defineSchema(props.schemaDefinitionFile); - if (defaultAuthorizationType === AuthorizationType.API_KEY || - props.authorizationConfig?.additionalAuthorizationModes?.some( - (authMode) => authMode.authorizationType === AuthorizationType.API_KEY) - ) { - // create a variable for apiKeyConfig if one has been specified by the user - // first check is for default authorization - // second check is for additional authorization modes - const apiKeyConfig = props.authorizationConfig?.defaultAuthorization?.apiKeyConfig ?? - props.authorizationConfig?.additionalAuthorizationModes?. - find((mode: AuthorizationMode) => { - return mode.authorizationType === AuthorizationType.API_KEY && mode.apiKeyConfig; - })?.apiKeyConfig; - this._apiKey = this.createAPIKey(apiKeyConfig); + if (modes.some((mode) => mode.authorizationType === AuthorizationType.API_KEY)) { + const config = modes.find((mode: AuthorizationMode) => { + return mode.authorizationType === AuthorizationType.API_KEY && mode.apiKeyConfig; + })?.apiKeyConfig; + this._apiKey = this.createAPIKey(config); this._apiKey.addDependsOn(this.schema); this.apiKey = this._apiKey.attrApiKey; } @@ -532,14 +492,8 @@ export class GraphQLApi extends GraphqlApiBase { return this.grant(grantee, IamResource.ofType('Subscription', ...fields), 'appsync:GraphQL'); } - private validateAuthorizationProps(props: GraphQLApiProps) { - const defaultMode = props.authorizationConfig?.defaultAuthorization ?? { - authorizationType: AuthorizationType.API_KEY, - }; - const additionalModes = props.authorizationConfig?.additionalAuthorizationModes ?? []; - const allModes = [defaultMode, ...additionalModes]; - - allModes.map((mode) => { + private validateAuthorizationProps(modes: AuthorizationMode[]) { + modes.map((mode) => { if (mode.authorizationType === AuthorizationType.OIDC && !mode.openIdConnectConfig) { throw new Error('Missing default OIDC Configuration'); } @@ -547,12 +501,10 @@ export class GraphQLApi extends GraphqlApiBase { throw new Error('Missing default OIDC Configuration'); } }); - - if (allModes.filter((mode) => mode.authorizationType === AuthorizationType.API_KEY).length > 1) { + if (modes.filter((mode) => mode.authorizationType === AuthorizationType.API_KEY).length > 1) { throw new Error('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } - - if (allModes.filter((mode) => mode.authorizationType === AuthorizationType.IAM).length > 1) { + if (modes.filter((mode) => mode.authorizationType === AuthorizationType.IAM).length > 1) { throw new Error('You can\'t duplicate IAM configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); } } @@ -567,9 +519,24 @@ export class GraphQLApi extends GraphqlApiBase { return true; } - private formatOpenIdConnectConfig( - config: OpenIdConnectConfig, - ): CfnGraphQLApi.OpenIDConnectConfigProperty { + private setupLogConfig(config?: LogConfig) { + if (!config) return undefined; + const role = new Role(this, 'ApiLogsRole', { + assumedBy: new ServicePrincipal('appsync.amazonaws.com'), + managedPolicies: [ + ManagedPolicy.fromAwsManagedPolicyName( + 'service-role/AWSAppSyncPushToCloudWatchLogs'), + ], + }); + return { + cloudWatchLogsRoleArn: role.roleArn, + excludeVerboseContent: config.excludeVerboseContent, + fieldLogLevel: config.fieldLogLevel, + }; + } + + private setupOpenIdConnectConfig(config?: OpenIdConnectConfig) { + if (!config) return undefined; return { authTtl: config.tokenExpiryFromAuth, clientId: config.clientId, @@ -578,17 +545,27 @@ export class GraphQLApi extends GraphqlApiBase { }; } - private formatUserPoolConfig( - config: UserPoolConfig, - ): CfnGraphQLApi.UserPoolConfigProperty { + private setupUserPoolConfig(config?: UserPoolConfig) { + if (!config) return undefined; return { userPoolId: config.userPool.userPoolId, awsRegion: config.userPool.stack.region, appIdClientRegex: config.appIdClientRegex, - defaultAction: config.defaultAction || 'ALLOW', + defaultAction: config.defaultAction, }; } + private setupAdditionalAuthorizationModes(modes?: AuthorizationMode[]) { + if (!modes || modes.length === 0) return undefined; + return modes.reduce((acc, mode) => [ + ...acc, { + authenticationType: mode.authorizationType, + userPoolConfig: this.setupUserPoolConfig(mode.userPoolConfig), + openIdConnectConfig: this.setupOpenIdConnectConfig(mode.openIdConnectConfig), + }, + ], []); + } + private createAPIKey(config?: ApiKeyConfig) { let expires: number | undefined; if (config?.expires) { @@ -607,35 +584,6 @@ export class GraphQLApi extends GraphqlApiBase { }); } - private formatAdditionalAuthorizationModes( - authModes: AuthorizationMode[], - ): CfnGraphQLApi.AdditionalAuthenticationProviderProperty[] { - return authModes.reduce< - CfnGraphQLApi.AdditionalAuthenticationProviderProperty[] - >( - (acc, authMode) => [ - ...acc, - { - authenticationType: authMode.authorizationType, - userPoolConfig: - authMode.authorizationType === AuthorizationType.USER_POOL - ? this.formatUserPoolConfig(authMode.userPoolConfig!) - : undefined, - openIdConnectConfig: - authMode.authorizationType === AuthorizationType.OIDC - ? this.formatOpenIdConnectConfig(authMode.openIdConnectConfig!) - : undefined, - }, - ], - [], - ); - } - - private formatAdditionalAuthenticationProviders(props: GraphQLApiProps): CfnGraphQLApi.AdditionalAuthenticationProviderProperty[] | undefined { - const authModes = props.authorizationConfig?.additionalAuthorizationModes; - return authModes ? this.formatAdditionalAuthorizationModes(authModes) : undefined; - } - /** * Define schema based on props configuration * @param file the file name/s3 location of Schema @@ -670,7 +618,7 @@ export class GraphQLApi extends GraphqlApiBase { * @experimental */ public appendToSchema(addition: string, delimiter?: string): void { - if ( this.schemaMode != SchemaDefinition.CODE ) { + if ( this.schemaMode !== SchemaDefinition.CODE ) { throw new Error('API cannot append to schema because schema definition mode is not configured as CODE.'); } const sep = delimiter ?? ''; @@ -686,7 +634,7 @@ export class GraphQLApi extends GraphqlApiBase { * @experimental */ public addType(name: string, props: ObjectTypeProps): ObjectType { - if ( this.schemaMode != SchemaDefinition.CODE ) { + if ( this.schemaMode !== SchemaDefinition.CODE ) { throw new Error('API cannot add type because schema definition mode is not configured as CODE.'); }; const type = new ObjectType(name, { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts deleted file mode 100644 index 0edba3c360ac9..0000000000000 --- a/packages/@aws-cdk/aws-appsync/test/appsync-apikey.test.ts +++ /dev/null @@ -1,206 +0,0 @@ -import '@aws-cdk/assert/jest'; -import * as path from 'path'; -import * as cognito from '@aws-cdk/aws-cognito'; -import * as cdk from '@aws-cdk/core'; -import * as appsync from '../lib'; - -describe('AppSync Authorization Config', () => { - test('AppSync creates default api key', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - }); - - // THEN - expect(stack).toHaveResource('AWS::AppSync::ApiKey'); - }); - - test('AppSync creates api key from additionalAuthorizationModes', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - additionalAuthorizationModes: [ - { authorizationType: appsync.AuthorizationType.API_KEY }, - ], - }, - }); - - // THEN - expect(stack).toHaveResource('AWS::AppSync::ApiKey'); - }); - - test('AppSync does not create unspecified api key from additionalAuthorizationModes', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - }, - }); - - // THEN - expect(stack).not.toHaveResource('AWS::AppSync::ApiKey'); - }); - - test('appsync does not create unspecified api key with empty additionalAuthorizationModes', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - additionalAuthorizationModes: [], - }, - }); - - // THEN - expect(stack).not.toHaveResource('AWS::AppSync::ApiKey'); - }); - - test('appsync creates configured api key with additionalAuthorizationModes', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - additionalAuthorizationModes: [{ - authorizationType: appsync.AuthorizationType.API_KEY, - apiKeyConfig: { - description: 'Custom Description', - }, - }], - }, - }); - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { - Description: 'Custom Description', - }); - }); - - test('appsync creates configured api key with additionalAuthorizationModes (not as first element)', () => { - // GIVEN - const stack = new cdk.Stack(); - const userPool = new cognito.UserPool(stack, 'myPool'); - - // WHEN - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - additionalAuthorizationModes: [ - { - authorizationType: appsync.AuthorizationType.USER_POOL, - userPoolConfig: { - userPool, - }, - }, - { - authorizationType: appsync.AuthorizationType.API_KEY, - apiKeyConfig: { - description: 'Custom Description', - }, - }, - ], - }, - }); - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { - Description: 'Custom Description', - }); - }); - - test('appsync fails when multiple API_KEY auth modes', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - const when = () => { - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.API_KEY, - }, - additionalAuthorizationModes: [{ - authorizationType: appsync.AuthorizationType.API_KEY, - }], - }, - }); - }; - - // THEN - expect(when).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); - }); - - test('appsync fails when multiple API_KEY auth modes in additionalXxx', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - const when = () => { - new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM, - }, - additionalAuthorizationModes: [ - { - authorizationType: appsync.AuthorizationType.API_KEY, - }, - { - authorizationType: appsync.AuthorizationType.API_KEY, - }, - ], - }, - }); - }; - - // THEN - expect(when).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); - }); -}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts new file mode 100644 index 0000000000000..84cfa79aac5fd --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts @@ -0,0 +1,588 @@ +import '@aws-cdk/assert/jest'; +import * as path from 'path'; +import * as cognito from '@aws-cdk/aws-cognito'; +import * as cdk from '@aws-cdk/core'; +import * as appsync from '../lib'; + +// GIVEN +let stack: cdk.Stack; +beforeEach(() => { + stack = new cdk.Stack(); +}); + +describe('AppSync API Key Authorization', () => { + test('AppSync creates default api key', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + }); + + // THEN + expect(stack).toHaveResource('AWS::AppSync::ApiKey'); + }); + + test('AppSync creates api key from additionalAuthorizationModes', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [ + { authorizationType: appsync.AuthorizationType.API_KEY }, + ], + }, + }); + + // THEN + expect(stack).toHaveResource('AWS::AppSync::ApiKey'); + }); + + test('AppSync does not create unspecified api key from additionalAuthorizationModes', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::AppSync::ApiKey'); + }); + + test('appsync does not create unspecified api key with empty additionalAuthorizationModes', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [], + }, + }); + + // THEN + expect(stack).not.toHaveResource('AWS::AppSync::ApiKey'); + }); + + test('appsync creates configured api key with additionalAuthorizationModes', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.API_KEY, + apiKeyConfig: { description: 'Custom Description' }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { + Description: 'Custom Description', + }); + }); + + test('appsync creates configured api key with additionalAuthorizationModes (not as first element)', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [ + { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { userPool: new cognito.UserPool(stack, 'myPool') }, + }, + { + authorizationType: appsync.AuthorizationType.API_KEY, + apiKeyConfig: { description: 'Custom Description' }, + }, + ], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::ApiKey', { + Description: 'Custom Description', + }); + }); + + test('appsync fails when empty default and API_KEY in additional', () => { + // THEN + expect(() => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.API_KEY, + }], + }, + }); + }).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); + + test('appsync fails when multiple API_KEY auth modes', () => { + // THEN + expect(() => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.API_KEY }, + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.API_KEY, + }], + }, + }); + }).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); + + test('appsync fails when multiple API_KEY auth modes in additionalXxx', () => { + // THEN + expect(() => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [ + { authorizationType: appsync.AuthorizationType.API_KEY }, + { authorizationType: appsync.AuthorizationType.API_KEY }, + ], + }, + }); + }).toThrowError('You can\'t duplicate API_KEY configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); +}); + +describe('AppSync IAM Authorization', () => { + test('Iam authorization configurable in default authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'AWS_IAM', + }); + }); + + test('Iam authorization configurable in additional authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.IAM }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AdditionalAuthenticationProviders: [{ AuthenticationType: 'AWS_IAM' }], + }); + }); + + test('appsync fails when multiple iam auth modes', () => { + // THEN + expect(() => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, + additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.IAM }], + }, + }); + }).toThrowError('You can\'t duplicate IAM configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); + + test('appsync fails when multiple IAM auth modes in additionalXxx', () => { + // THEN + expect(() => { + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [ + { authorizationType: appsync.AuthorizationType.IAM }, + { authorizationType: appsync.AuthorizationType.IAM }, + ], + }, + }); + }).toThrowError('You can\'t duplicate IAM configuration. See https://docs.aws.amazon.com/appsync/latest/devguide/security.html'); + }); +}); + +describe('AppSync User Pool Authorization', () => { + let userPool: cognito.UserPool; + beforeEach(() => { + userPool = new cognito.UserPool(stack, 'pool'); + }); + test('User Pool authorization configurable in default authorization has default configuration', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { userPool }, + }, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }); + }); + + test('User Pool authorization configurable in default authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { + userPool, + appIdClientRegex: 'test', + defaultAction: appsync.UserPoolDefaultAction.DENY, + }, + }, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + DefaultAction: 'DENY', + AppIdClientRegex: 'test', + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }); + }); + + test('User Pool authorization configurable in additional authorization has default configuration', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { userPool }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AdditionalAuthenticationProviders: [{ + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }], + }); + }); + + test('User Pool property defaultAction does not configure when in additional auth', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { + userPool, + appIdClientRegex: 'test', + defaultAction: appsync.UserPoolDefaultAction.DENY, + }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AdditionalAuthenticationProviders: [{ + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + AppIdClientRegex: 'test', + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }], + }); + }); + + test('User Pool property defaultAction does not configure when in additional auth', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { userPool }, + }, + additionalAuthorizationModes: [ + { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { userPool }, + }, + { + authorizationType: appsync.AuthorizationType.USER_POOL, + userPoolConfig: { + userPool, + appIdClientRegex: 'test', + defaultAction: appsync.UserPoolDefaultAction.DENY, + }, + }, + ], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + AdditionalAuthenticationProviders: [ + { + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }, + { + AuthenticationType: 'AMAZON_COGNITO_USER_POOLS', + UserPoolConfig: { + AwsRegion: { Ref: 'AWS::Region' }, + AppIdClientRegex: 'test', + UserPoolId: { Ref: 'pool056F3F7E' }, + }, + }, + ], + }); + }); +}); + +describe('AppSync OIDC Authorization', () => { + test('OIDC authorization configurable in default authorization has default configuration', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { oidcProvider: 'test' }, + }, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + Issuer: 'test', + }, + }); + }); + + test('User Pool authorization configurable in default authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { + oidcProvider: 'test', + clientId: 'id', + tokenExpiryFromAuth: 1, + tokenExpiryFromIssue: 1, + }, + }, + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + AuthTTL: 1, + ClientId: 'id', + IatTTL: 1, + Issuer: 'test', + }, + }); + }); + + test('OIDC authorization configurable in additional authorization has default configuration', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { oidcProvider: 'test' }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AdditionalAuthenticationProviders: [{ + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + Issuer: 'test', + }, + }], + }); + }); + + test('User Pool authorization configurable in additional authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + additionalAuthorizationModes: [{ + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { + oidcProvider: 'test', + clientId: 'id', + tokenExpiryFromAuth: 1, + tokenExpiryFromIssue: 1, + }, + }], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AdditionalAuthenticationProviders: [{ + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + AuthTTL: 1, + ClientId: 'id', + IatTTL: 1, + Issuer: 'test', + }, + }], + }); + }); + + test('User Pool authorization configurable in with multiple authorization', () => { + // WHEN + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.FILE, + schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + authorizationConfig: { + defaultAuthorization: { + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { oidcProvider: 'test' }, + }, + additionalAuthorizationModes: [ + { + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { + oidcProvider: 'test1', + clientId: 'id', + tokenExpiryFromAuth: 1, + tokenExpiryFromIssue: 1, + }, + }, + { + authorizationType: appsync.AuthorizationType.OIDC, + openIdConnectConfig: { + oidcProvider: 'test2', + clientId: 'id', + tokenExpiryFromAuth: 1, + tokenExpiryFromIssue: 1, + }, + }, + ], + }, + }); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLApi', { + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { Issuer: 'test' }, + AdditionalAuthenticationProviders: [ + { + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + AuthTTL: 1, + ClientId: 'id', + IatTTL: 1, + Issuer: 'test1', + }, + }, + { + AuthenticationType: 'OPENID_CONNECT', + OpenIDConnectConfig: { + AuthTTL: 1, + ClientId: 'id', + IatTTL: 1, + Issuer: 'test2', + }, + }, + ], + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts index 34e0eeaade11c..079342f95c34f 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts @@ -292,32 +292,26 @@ describe('testing InterfaceType properties', () => { describe('testing Object Type properties', () => { test('errors when no InterfaceTypes are specified', () => { - // WHEN - const when = () => { + // THEN + expect(() => { appsync.ObjectType.implementInterface('objectTest', { definition: { id2: t.id, }, }); - }; - - // THEN - expect(when).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); + }).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); }); test('errors when implementing empty InterfaceTypes properties', () => { - // WHEN - const when = () => { + // THEN + expect(() => { appsync.ObjectType.implementInterface('objectTest', { interfaceTypes: [], definition: { id2: t.id, }, }); - }; - - // THEN - expect(when).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); + }).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); }); test('ObjectType can implement from interface types', () => { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 0aca4e4ccc6c4..12d8d543c8556 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -72,14 +72,11 @@ describe('DynamoDb Data Source configuration', () => { }); test('appsync errors when creating multiple dynamo db data sources with no configuration', () => { - // WHEN - const when = () => { + // THEN + expect(() => { api.addDynamoDbDataSource('ds', table); api.addDynamoDbDataSource('ds', table); - }; - - // THEN - expect(when).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); + }).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts index 1b51183fe8abb..25ef663be23cc 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts @@ -28,13 +28,10 @@ beforeEach(() => { describe('grant Permissions', () => { test('IamResource throws error when custom is called with no arguments', () => { - // WHEN - const when = () => { - api.grant(role, appsync.IamResource.custom(), 'appsync:GraphQL'); - }; - //THEN - expect(when).toThrowError('At least 1 custom ARN must be provided.'); + expect(() => { + api.grant(role, appsync.IamResource.custom(), 'appsync:GraphQL'); + }).toThrowError('At least 1 custom ARN must be provided.'); }); test('grant provides custom permissions when called with `custom` argument', () => { diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts index 0d5c653eae84f..eac1415be5a67 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts @@ -59,14 +59,11 @@ describe('Http Data Source configuration', () => { }); test('appsync errors when creating multiple http data sources with no configuration', () => { - // WHEN - const when = () => { + // THEN + expect(() => { api.addHttpDataSource('ds', endpoint); api.addHttpDataSource('ds', endpoint); - }; - - // THEN - expect(when).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); + }).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts index 9b9113739bc54..b4e35c0058e55 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts @@ -67,14 +67,11 @@ describe('Lambda Data Source configuration', () => { }); test('appsync errors when creating multiple lambda data sources with no configuration', () => { - // WHEN - const when = () => { + // THEN + expect(() => { api.addLambdaDataSource('ds', func); api.addLambdaDataSource('ds', func); - }; - - // THEN - expect(when).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); + }).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts index f1f9faba9d09b..e391d16bfb6b2 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts @@ -57,25 +57,19 @@ describe('None Data Source configuration', () => { }); test('appsync errors when creating multiple none data sources with no configuration', () => { - // WHEN - const when = () => { + // THEN + expect(() => { api.addNoneDataSource('ds'); api.addNoneDataSource('ds'); - }; - - // THEN - expect(when).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); + }).toThrow("There is already a Construct with name 'ds' in GraphQLApi [baseApi]"); }); test('appsync errors when creating multiple none data sources with same name configuration', () => { - // WHEN - const when = () => { + // THEN + expect(() => { api.addNoneDataSource('ds1', { name: 'custom' }); api.addNoneDataSource('ds2', { name: 'custom' }); - }; - - // THEN - expect(when).not.toThrowError(); + }).not.toThrowError(); }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts index 25542722f92e9..ee358b658fab3 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts @@ -47,17 +47,14 @@ describe('basic testing schema definition mode `code`', () => { }); test('definition mode `code` errors when schemaDefinitionFile is configured', () => { - // WHEN - const when = () => { + // THEN + expect(() => { new appsync.GraphQLApi(stack, 'API', { name: 'demo', schemaDefinition: appsync.SchemaDefinition.CODE, schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), }); - }; - - // THEN - expect(when).toThrowError('definition mode CODE is incompatible with file definition. Change mode to FILE/S3 or unconfigure schemaDefinitionFile'); + }).toThrowError('definition mode CODE is incompatible with file definition. Change mode to FILE/S3 or unconfigure schemaDefinitionFile'); }); }); @@ -79,16 +76,13 @@ describe('testing schema definition mode `file`', () => { }); test('definition mode `file` errors when schemaDefinitionFile is not configured', () => { - // WHEN - const when = () => { + // THEN + expect(() => { new appsync.GraphQLApi(stack, 'API', { name: 'demo', schemaDefinition: appsync.SchemaDefinition.FILE, }); - }; - - // THEN - expect(when).toThrowError('schemaDefinitionFile must be configured if using FILE definition mode.'); + }).toThrowError('schemaDefinitionFile must be configured if using FILE definition mode.'); }); test('definition mode `file` errors when addType is called', () => { @@ -99,14 +93,12 @@ describe('testing schema definition mode `file`', () => { schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), }); - const when = () => { + // THEN + expect(() => { api.addType('blah', { definition: { fail: t.id }, }); - }; - - // THEN - expect(when).toThrowError('API cannot add type because schema definition mode is not configured as CODE.'); + }).toThrowError('API cannot add type because schema definition mode is not configured as CODE.'); }); test('definition mode `file` errors when appendToSchema is called', () => { @@ -117,12 +109,10 @@ describe('testing schema definition mode `file`', () => { schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), }); - const when = () => { - api.appendToSchema('blah'); - }; - // THEN - expect(when).toThrowError('API cannot append to schema because schema definition mode is not configured as CODE.'); + expect(() => { + api.appendToSchema('blah'); + }).toThrowError('API cannot append to schema because schema definition mode is not configured as CODE.'); }); }); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts index d9faa4eeed03d..9008f9b117d47 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts @@ -3,24 +3,6 @@ import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; -test('should not throw an Error', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - const when = () => { - new appsync.GraphQLApi(stack, 'api', { - authorizationConfig: {}, - schemaDefinition: appsync.SchemaDefinition.FILE, - name: 'api', - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - }); - }; - - // THEN - expect(when).not.toThrow(); -}); - test('appsync should configure pipeline when pipelineConfig has contents', () => { // GIVEN const stack = new cdk.Stack(); From e980c004fa5c0f0baa889fd4e848a4eaf1f79cfc Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Mon, 24 Aug 2020 10:54:37 +0200 Subject: [PATCH 17/42] chore: fix cfnspec's spec-diff tool (#9930) In some odd cases, a scope will not declare any properties, and will not have an empty object their either. Gracefully handle this situation. --- packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts b/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts index 889e631eacf27..f4aa0ee7daab3 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts @@ -139,7 +139,7 @@ async function main() { throw new Error('Unexpected update to a resource type. Expecting only "Properties" to change: ' + propertyType); } - for (const prop of Object.keys(update.Properties)) { + for (const prop of Object.keys(update.Properties ?? {})) { describeChanges(propertyType, prop, update.Properties[prop]).forEach(change => { propertyTypeChanges.push(change); }); From fdddb1008f28240a035c7b3d566eb4259c403c1a Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Mon, 24 Aug 2020 11:37:09 +0200 Subject: [PATCH 18/42] chore: change bootstrap SSM prefix to "cdk-bootstrap" (#9929) It used to be `aws-cdk-bootstrap` but we're not allowed to start strings with the letters `aws`, those names are reserved. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../core/lib/stack-synthesizers/default-synthesizer.ts | 4 ++-- .../core/test/stack-synthesis/test.new-style-synthesis.ts | 6 +++--- .../pipelines/test/integ.pipeline-with-assets.expected.json | 4 ++-- .../@aws-cdk/pipelines/test/integ.pipeline.expected.json | 4 ++-- packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts index cac58e7461528..e666cec182ade 100644 --- a/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts +++ b/packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts @@ -476,7 +476,7 @@ function addBootstrapVersionRule(stack: Stack, requiredVersion: number, qualifie const param = new CfnParameter(stack, 'BootstrapVersion', { type: 'AWS::SSM::Parameter::Value', description: 'Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store.', - default: `/aws-cdk-bootstrap/${qualifier}/version`, + default: `/cdk-bootstrap/${qualifier}/version`, }); // There is no >= check in CloudFormation, so we have to check the number @@ -499,4 +499,4 @@ function range(startIncl: number, endExcl: number) { ret.push(i); } return ret; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts b/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts index 79c852d494247..7d88ce7c0be49 100644 --- a/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts +++ b/packages/@aws-cdk/core/test/stack-synthesis/test.new-style-synthesis.ts @@ -36,7 +36,7 @@ export = { // THEN -- the S3 url is advertised on the stack artifact const stackArtifact = asm.getStackArtifact('Stack'); - const templateHash = '19e1e8612660f79362e091714ab7b3583961936d762c75be8b8083c3af40850a'; + const templateHash = '040a6374d4c48c0db867f1d4f95c69b12d28e69c3b8a9903a1db1ec651dcf480'; test.equals(stackArtifact.stackTemplateAssetObjectUrl, `s3://cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}/${templateHash}`); @@ -70,7 +70,7 @@ export = { // THEN const template = app.synth().getStackByName('Stack').template; test.deepEqual(template?.Parameters?.BootstrapVersion?.Type, 'AWS::SSM::Parameter::Value'); - test.deepEqual(template?.Parameters?.BootstrapVersion?.Default, '/aws-cdk-bootstrap/hnb659fds/version'); + test.deepEqual(template?.Parameters?.BootstrapVersion?.Default, '/cdk-bootstrap/hnb659fds/version'); const assertions = template?.Rules?.CheckBootstrapVersion?.Assertions ?? []; test.deepEqual(assertions.length, 1); @@ -220,4 +220,4 @@ function readAssetManifest(asm: cxapi.CloudAssembly): cxschema.AssetManifest { if (!manifestArtifact) { throw new Error('no asset manifest in assembly'); } return JSON.parse(fs.readFileSync(manifestArtifact.file, { encoding: 'utf-8' })); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json index 0f87f89024dbb..bf0e04a7f96b9 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json @@ -2,7 +2,7 @@ "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws-cdk-bootstrap/hnb659fds/version", + "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store." } }, @@ -1694,4 +1694,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json index 336c2494b3f00..d608c7a22b842 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json @@ -2,7 +2,7 @@ "Parameters": { "BootstrapVersion": { "Type": "AWS::SSM::Parameter::Value", - "Default": "/aws-cdk-bootstrap/hnb659fds/version", + "Default": "/cdk-bootstrap/hnb659fds/version", "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store." } }, @@ -1390,4 +1390,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml index eb90045569e8b..91a2a606341f4 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml @@ -368,7 +368,7 @@ Resources: Properties: Type: String Name: - Fn::Sub: '/aws-cdk-bootstrap/${Qualifier}/version' + Fn::Sub: '/cdk-bootstrap/${Qualifier}/version' Value: 4 Outputs: BucketName: @@ -401,4 +401,4 @@ Outputs: Description: The version of the bootstrap resources that are currently mastered in this stack Value: - Fn::GetAtt: [CdkBootstrapVersion, Value] \ No newline at end of file + Fn::GetAtt: [CdkBootstrapVersion, Value] From f0c76ac1f930fcbe7a2610e7aeeb4a46721516e1 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 24 Aug 2020 11:59:47 +0100 Subject: [PATCH 19/42] feat(s3): imported buckets can have an explicit region (#9936) #8280 enabled imported resources to be account & region aware. However, while this set the region on the object itself, it didn't adjust the various region-aware properties of imported buckets (e.g., regional domain names). This change makes the regional properties of the imported bucket use the correct region. fixes #9556 ---- *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/README.md | 11 +++++++++++ packages/@aws-cdk/aws-s3/lib/bucket.ts | 2 +- packages/@aws-cdk/aws-s3/test/test.bucket.ts | 16 ++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index 01165967f3dbc..335cdfd871f8a 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -135,6 +135,17 @@ const byName = Bucket.fromBucketName(this, 'BucketByName', 'my-bucket'); const byArn = Bucket.fromBucketArn(this, 'BucketByArn', 'arn:aws:s3:::my-bucket'); ``` +The bucket's region defaults to the current stack's region, but can also be explicitly set in cases where one of the bucket's +regional properties needs to contain the correct values. + +```ts +const myCrossRegionBucket = Bucket.fromBucketAttributes(this, 'CrossRegionImport', { + bucketArn: 'arn:aws:s3:::my-bucket', + region: 'us-east-1', +}); +// myCrossRegionBucket.bucketRegionalDomainName === 'my-bucket.s3.us-east-1.amazonaws.com' +``` + ### Bucket Notifications The Amazon S3 notification feature enables you to receive notifications when diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index d767011ecb5d3..d44f989ba267b 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -1125,7 +1125,7 @@ export class Bucket extends BucketBase { */ public static fromBucketAttributes(scope: Construct, id: string, attrs: BucketAttributes): IBucket { const stack = Stack.of(scope); - const region = stack.region; + const region = attrs.region ?? stack.region; const urlSuffix = stack.urlSuffix; const bucketName = parseBucketName(scope, attrs); diff --git a/packages/@aws-cdk/aws-s3/test/test.bucket.ts b/packages/@aws-cdk/aws-s3/test/test.bucket.ts index 4e2a8bb60e2aa..2c9e13c798e96 100644 --- a/packages/@aws-cdk/aws-s3/test/test.bucket.ts +++ b/packages/@aws-cdk/aws-s3/test/test.bucket.ts @@ -697,6 +697,22 @@ export = { test.done(); }, + + 'import can explicitly set bucket region'(test: Test) { + const stack = new cdk.Stack(undefined, undefined, { + env: { region: 'us-east-1' }, + }); + + const bucket = s3.Bucket.fromBucketAttributes(stack, 'ImportedBucket', { + bucketName: 'myBucket', + region: 'eu-west-1', + }); + + test.equals(bucket.bucketRegionalDomainName, `myBucket.s3.eu-west-1.${stack.urlSuffix}`); + test.equals(bucket.bucketWebsiteDomainName, `myBucket.s3-website-eu-west-1.${stack.urlSuffix}`); + + test.done(); + }, }, 'grantRead'(test: Test) { From 1bbadda7bd46811749521772843e5ddb822124cb Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 24 Aug 2020 13:30:47 +0100 Subject: [PATCH 20/42] chore(elasticloadbalancingv2): Update README for Java naming collision (#9933) The `aws-auto-scaling-group` and `aws-elasticloadbalancingv2` modules both contain a `HealthCheck` class, meaning those copy/pasting from the Javadocs will get an error on the HealthCheck usage in the Lambda example. Update the import for ASGs to be qualified to remove the conflict. fixes #9895 ---- *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-elasticloadbalancingv2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md index 4ef361dd5512c..a32ae8adf49ef 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/README.md @@ -25,7 +25,7 @@ and adding Targets to the Listener: ```ts import * as ec2 from '@aws-cdk/aws-ec2'; import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2'; -import * as autoscaling from '@aws-cdk/aws-autoscaling'; +import { AutoScalingGroup } from '@aws-cdk/aws-autoscaling'; // ... @@ -51,7 +51,7 @@ const listener = lb.addListener('Listener', { // Create an AutoScaling group and add it as a load balancing // target to the listener. -const asg = new autoscaling.AutoScalingGroup(...); +const asg = new AutoScalingGroup(...); listener.addTargets('ApplicationFleet', { port: 8080, targets: [asg] From e8938282b2649fa7c4aa126cc9bb7e8d28600d77 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 24 Aug 2020 13:56:30 +0100 Subject: [PATCH 21/42] feat(rds): grantConnect for database instances (#9887) As a follow-on to enabling IAM database auth, this change makes it easier to grant a user/role access to the database via policy. fixes #1558 ---- *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 | 22 +++ packages/@aws-cdk/aws-rds/lib/instance.ts | 25 ++- .../@aws-cdk/aws-rds/test/test.instance.ts | 146 +++++++++--------- 3 files changed, 118 insertions(+), 75 deletions(-) diff --git a/packages/@aws-cdk/aws-rds/README.md b/packages/@aws-cdk/aws-rds/README.md index 51729d3778386..829e7237f33e6 100644 --- a/packages/@aws-cdk/aws-rds/README.md +++ b/packages/@aws-cdk/aws-rds/README.md @@ -206,6 +206,28 @@ The rotation will start as soon as this user exists. See also [@aws-cdk/aws-secretsmanager](https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-secretsmanager/README.md) for credentials rotation of existing clusters/instances. +### IAM Authentication + +You can also authenticate to a database instance using AWS Identity and Access Management (IAM) database authentication; +See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html for more information +and a list of supported versions and limitations. + +The following example shows enabling IAM authentication for a database instance and granting connection access to an IAM role. + +```ts +const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), + masterUsername: 'admin', + vpc, + iamAuthentication: true, // Optional - will be automatically set if you call grantConnect(). +}); +const role = new Role(stack, 'DBRole', { assumedBy: new AccountPrincipal(stack.account) }); +instance.grantConnect(role); // Grant the role connection access to the DB. +``` + +**Note**: In addition to the setup above, a database user will need to be created to support IAM auth. +See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.DBAccounts.html for setup instructions. + ### Metrics Database instances expose metrics (`cloudwatch.Metric`): diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index 0890b26b705d2..dd8c100ca925b 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -53,6 +53,11 @@ export interface IDatabaseInstance extends IResource, ec2.IConnectable, secretsm */ addProxy(id: string, options: DatabaseProxyOptions): DatabaseProxy; + /** + * Grant the given identity connection access to the database. + */ + grantConnect(grantee: iam.IGrantable): iam.Grant; + /** * Defines a CloudWatch event rule which triggers for instance events. Use * `rule.addEventPattern(pattern)` to specify a filter. @@ -103,6 +108,7 @@ export abstract class DatabaseInstanceBase extends Resource implements IDatabase public readonly dbInstanceEndpointAddress = attrs.instanceEndpointAddress; public readonly dbInstanceEndpointPort = attrs.port.toString(); public readonly instanceEndpoint = new Endpoint(attrs.instanceEndpointAddress, attrs.port); + protected enableIamAuthentication = true; } return new Import(scope, id); @@ -112,6 +118,7 @@ export abstract class DatabaseInstanceBase extends Resource implements IDatabase public abstract readonly dbInstanceEndpointAddress: string; public abstract readonly dbInstanceEndpointPort: string; public abstract readonly instanceEndpoint: Endpoint; + protected abstract enableIamAuthentication?: boolean; /** * Access to network connections. @@ -128,6 +135,19 @@ export abstract class DatabaseInstanceBase extends Resource implements IDatabase }); } + public grantConnect(grantee: iam.IGrantable): iam.Grant { + if (this.enableIamAuthentication === false) { + throw new Error('Cannot grant connect when IAM authentication is disabled'); + } + + this.enableIamAuthentication = true; + return iam.Grant.addToPrincipal({ + grantee, + actions: ['rds-db:connect'], + resourceArns: [this.instanceArn], + }); + } + /** * Defines a CloudWatch event rule which triggers for instance events. Use * `rule.addEventPattern(pattern)` to specify a filter. @@ -494,6 +514,8 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData private readonly cloudwatchLogsRetention?: logs.RetentionDays; private readonly cloudwatchLogsRetentionRole?: iam.IRole; + protected enableIamAuthentication?: boolean; + constructor(scope: Construct, id: string, props: DatabaseInstanceNewProps) { super(scope, id); @@ -532,6 +554,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData this.cloudwatchLogsExports = props.cloudwatchLogsExports; this.cloudwatchLogsRetention = props.cloudwatchLogsRetention; this.cloudwatchLogsRetentionRole = props.cloudwatchLogsRetentionRole; + this.enableIamAuthentication = props.iamAuthentication; this.newCfnProps = { autoMinorVersionUpgrade: props.autoMinorVersionUpgrade, @@ -544,7 +567,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData deleteAutomatedBackups: props.deleteAutomatedBackups, deletionProtection, enableCloudwatchLogsExports: this.cloudwatchLogsExports, - enableIamDatabaseAuthentication: props.iamAuthentication, + enableIamDatabaseAuthentication: Lazy.anyValue({ produce: () => this.enableIamAuthentication }), enablePerformanceInsights: props.enablePerformanceInsights, iops, monitoringInterval: props.monitoringInterval && props.monitoringInterval.toSeconds(), diff --git a/packages/@aws-cdk/aws-rds/test/test.instance.ts b/packages/@aws-cdk/aws-rds/test/test.instance.ts index e72c83329edd4..3383f4f93cd55 100644 --- a/packages/@aws-cdk/aws-rds/test/test.instance.ts +++ b/packages/@aws-cdk/aws-rds/test/test.instance.ts @@ -1,19 +1,24 @@ -import { ABSENT, countResources, expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import { ABSENT, countResources, expect, haveResource, ResourcePart, haveResourceLike } from '@aws-cdk/assert'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as targets from '@aws-cdk/aws-events-targets'; -import { ManagedPolicy, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; +import { ManagedPolicy, Role, ServicePrincipal, AccountPrincipal } from '@aws-cdk/aws-iam'; import * as lambda from '@aws-cdk/aws-lambda'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; import * as rds from '../lib'; +let stack: cdk.Stack; +let vpc: ec2.Vpc; + export = { - 'create a DB instance'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); + 'setUp'(cb: () => void) { + stack = new cdk.Stack(); + vpc = new ec2.Vpc(stack, 'VPC'); + cb(); + }, + 'create a DB instance'(test: Test) { // WHEN new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.ORACLE_SE1, @@ -190,10 +195,6 @@ export = { }, 'instance with option and parameter group'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const optionGroup = new rds.OptionGroup(stack, 'OptionGroup', { engine: rds.DatabaseInstanceEngine.ORACLE_SE1, configurations: [ @@ -237,10 +238,6 @@ export = { }, 'create an instance from snapshot'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -257,10 +254,6 @@ export = { }, 'throws when trying to generate a new password from snapshot without username'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // THEN test.throws(() => new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -274,10 +267,6 @@ export = { }, 'throws when specifying user name without asking to generate a new password'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // THEN test.throws(() => new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -291,10 +280,6 @@ export = { }, 'throws when password and generate password ar both specified'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // THEN test.throws(() => new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -309,9 +294,6 @@ export = { }, 'create a read replica in the same region - with the subnet group name'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const sourceInstance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -349,9 +331,6 @@ export = { }, 'on event'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const instance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -416,9 +395,6 @@ export = { }, 'on event without target'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const instance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -467,10 +443,6 @@ export = { }, 'can use metricCPUUtilization'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN const instance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, @@ -492,10 +464,6 @@ export = { }, 'can resolve endpoint port and socket address'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN const instance = new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, @@ -523,10 +491,6 @@ export = { }, 'can deactivate backup'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, @@ -545,9 +509,6 @@ export = { }, 'imported instance with imported security group with allowAllOutbound set to false'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const instance = rds.DatabaseInstance.fromDatabaseInstanceAttributes(stack, 'Database', { instanceEndpointAddress: 'address', instanceIdentifier: 'identifier', @@ -569,10 +530,6 @@ export = { }, 'create an instance with imported monitoring role'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - const monitoringRole = new Role(stack, 'MonitoringRole', { assumedBy: new ServicePrincipal('monitoring.rds.amazonaws.com'), managedPolicies: [ @@ -602,9 +559,6 @@ export = { }, 'create an instance with an existing security group'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const securityGroup = ec2.SecurityGroup.fromSecurityGroupId(stack, 'SG', 'sg-123456789', { allowAllOutbound: false, }); @@ -644,9 +598,6 @@ export = { }, 'throws when trying to add rotation to an instance without secret'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const instance = new rds.DatabaseInstance(stack, 'Database', { engine: rds.DatabaseInstanceEngine.SQL_SERVER_EE, instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -662,9 +613,6 @@ export = { }, 'throws when trying to add single user rotation multiple times'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); const instance = new rds.DatabaseInstance(stack, 'Database', { engine: rds.DatabaseInstanceEngine.SQL_SERVER_EE, instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), @@ -682,9 +630,6 @@ export = { }, 'throws when timezone is set for non-sqlserver database engine'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'vpc'); const tzSupportedEngines = [rds.DatabaseInstanceEngine.SQL_SERVER_EE, rds.DatabaseInstanceEngine.SQL_SERVER_EX, rds.DatabaseInstanceEngine.SQL_SERVER_SE, rds.DatabaseInstanceEngine.SQL_SERVER_WEB]; const tzUnsupportedEngines = [rds.DatabaseInstanceEngine.MYSQL, rds.DatabaseInstanceEngine.POSTGRES, @@ -715,10 +660,6 @@ export = { }, 'create an instance from snapshot with maximum allocated storage'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN new rds.DatabaseInstanceFromSnapshot(stack, 'Instance', { snapshotIdentifier: 'my-snapshot', @@ -737,10 +678,6 @@ export = { }, 'create a DB instance with maximum allocated storage'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'VPC'); - // WHEN new rds.DatabaseInstance(stack, 'Instance', { engine: rds.DatabaseInstanceEngine.MYSQL, @@ -759,4 +696,65 @@ export = { test.done(); }, + + 'iam authentication - off by default'(test: Test) { + new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), + masterUsername: 'admin', + vpc, + }); + + expect(stack).to(haveResourceLike('AWS::RDS::DBInstance', { + EnableIAMDatabaseAuthentication: ABSENT, + })); + + test.done(); + }, + + 'createGrant - creates IAM policy and enables IAM auth'(test: Test) { + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), + masterUsername: 'admin', + vpc, + }); + const role = new Role(stack, 'DBRole', { + assumedBy: new AccountPrincipal(stack.account), + }); + instance.grantConnect(role); + + expect(stack).to(haveResourceLike('AWS::RDS::DBInstance', { + EnableIAMDatabaseAuthentication: true, + })); + expect(stack).to(haveResource('AWS::IAM::Policy', { + PolicyDocument: { + Statement: [{ + Effect: 'Allow', + Action: 'rds-db:connect', + Resource: { + 'Fn::Join': ['', ['arn:', { Ref: 'AWS::Partition' }, ':rds:', { Ref: 'AWS::Region' }, ':', { Ref: 'AWS::AccountId' }, ':db:', { Ref: 'InstanceC1063A87' }]], + }, + }], + Version: '2012-10-17', + }, + })); + + test.done(); + }, + + 'createGrant - throws if IAM auth disabled'(test: Test) { + const instance = new rds.DatabaseInstance(stack, 'Instance', { + engine: rds.DatabaseInstanceEngine.mysql({ version: rds.MysqlEngineVersion.VER_8_0_19 }), + masterUsername: 'admin', + vpc, + iamAuthentication: false, + }); + const role = new Role(stack, 'DBRole', { + assumedBy: new AccountPrincipal(stack.account), + }); + + test.throws(() => { instance.grantConnect(role); }, /Cannot grant connect when IAM authentication is disabled/); + + test.done(); + }, + }; From 1c9b73361983346caa62921867519e3cfcc6288e Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 24 Aug 2020 14:28:42 +0100 Subject: [PATCH 22/42] fix(elasticloadbalancingv2): imported listener ignores conditions attribute (#9939) New conditions attribute usage was fixed in #8385 for owned listeners, but missed imported listeners. fixes #9262 fixes #9320 fixes #9643 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/alb/application-listener.ts | 1 + .../test/alb/test.listener.ts | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts index 7897f5582eb0a..65d6465cb9efe 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/lib/alb/application-listener.ts @@ -571,6 +571,7 @@ class ImportedApplicationListener extends Resource implements IApplicationListen // New rule new ApplicationListenerRule(this, id, { listener: this, + conditions: props.conditions, hostHeader: props.hostHeader, pathPattern: props.pathPattern, pathPatterns: props.pathPatterns, diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts index ed851080fa5b0..aa6345eac07cc 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts @@ -464,6 +464,38 @@ export = { test.done(); }, + 'Can call addTargetGroups on imported listener with conditions prop'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + const listener = elbv2.ApplicationListener.fromApplicationListenerAttributes(stack, 'Listener', { + listenerArn: 'ieks', + securityGroupId: 'sg-12345', + }); + const group = new elbv2.ApplicationTargetGroup(stack, 'TargetGroup', { vpc, port: 80 }); + + // WHEN + listener.addTargetGroups('Gruuup', { + priority: 30, + conditions: [elbv2.ListenerCondition.hostHeaders(['example.com'])], + targetGroups: [group], + }); + + // THEN + expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + ListenerArn: 'ieks', + Priority: 30, + Actions: [ + { + TargetGroupArn: { Ref: 'TargetGroup3D7CD9B8' }, + Type: 'forward', + }, + ], + })); + + test.done(); + }, + 'Can depend on eventual listener via TargetGroup'(test: Test) { // GIVEN const stack = new cdk.Stack(); From ef98b9f3b82129540177a94dc1cca7340856ae38 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Mon, 24 Aug 2020 19:30:57 +0100 Subject: [PATCH 23/42] feat(rds): deletion protection for RDS cluster (#9871) Enable setting deletionProtection for a DatabaseCluster. Note - Marking as 'exempt-readme' as I don't think this is big enough to merit a README change. Feel free to disagree. fixes #6944 ---- *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/lib/cluster.ts | 8 ++++++ .../@aws-cdk/aws-rds/test/test.cluster.ts | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts index d52fff47c476e..56075630e6e79 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts @@ -84,6 +84,13 @@ export interface DatabaseClusterProps { */ readonly defaultDatabaseName?: string; + /** + * Indicates whether the DB cluster should have deletion protection enabled. + * + * @default false + */ + readonly deletionProtection?: boolean; + /** * Whether to enable storage encryption. * @@ -425,6 +432,7 @@ export class DatabaseCluster extends DatabaseClusterBase { port: props.port ?? clusterEngineBindConfig.port, dbClusterParameterGroupName: clusterParameterGroupConfig?.parameterGroupName, associatedRoles: clusterAssociatedRoles.length > 0 ? clusterAssociatedRoles : undefined, + deletionProtection: props.deletionProtection, // Admin masterUsername: secret ? secret.secretValueFromJson('username').toString() : props.masterUser.username, masterUserPassword: secret diff --git a/packages/@aws-cdk/aws-rds/test/test.cluster.ts b/packages/@aws-cdk/aws-rds/test/test.cluster.ts index 105964b73e0c4..4414ed784b393 100644 --- a/packages/@aws-cdk/aws-rds/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-rds/test/test.cluster.ts @@ -1178,6 +1178,33 @@ export = { test.done(); }, + 'can set deletion protection'(test: Test) { + // GIVEN + const stack = testStack(); + const vpc = new ec2.Vpc(stack, 'VPC'); + + // WHEN + new DatabaseCluster(stack, 'Database', { + engine: DatabaseClusterEngine.AURORA, + masterUser: { + username: 'admin', + password: cdk.SecretValue.plainText('tooshort'), + }, + instanceProps: { + instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL), + vpc, + }, + deletionProtection: true, + }); + + // THEN + expect(stack).to(haveResourceLike('AWS::RDS::DBCluster', { + DeletionProtection: true, + })); + + test.done(); + }, + 'does not throw (but adds a node error) if a (dummy) VPC does not have sufficient subnets'(test: Test) { // GIVEN const stack = testStack(); From 9e3b7981dc269e66f45e2ee4ca54d281a7945723 Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Mon, 24 Aug 2020 15:28:24 -0700 Subject: [PATCH 24/42] feat(appsync): implement resolvable fields for code-first schema (#9660) Implemented interfaces and resolvable fields for code-first schema. `Field` extends `GraphqlType` and will allow you to define arguments.
Field Example ```gql type Node { test(argument: string): String } ``` The CDK code required would be: ```ts const field = new appsync.Field(appsync.GraphqlType.string(), { args: { argument: appsync.GraphqlType.string(), }, }); const type = new appsynce.ObjectType('Node', { definition: { test: field }, }); ```
`ResolvableField` extends `Field` and will allow you to define arguments and its resolvers. [**Object Types**](#Object-Types) can have fields that resolve and perform operations on your backend.
Resolvable Field Example For example, if we want to create the following type: ```gql type Query { get(argument: string): String } ``` The CDK code required would be: ```ts const field = new appsync.Field(appsync.GraphqlType.string(), { args: { argument: appsync.GraphqlType.string(), }, dataSource: api.addNoneDataSource('none'), requestMappingTemplate: dummyRequest, responseMappingTemplate: dummyResponse, }); const type = new appsynce.ObjectType('Query', { definition: { get: field }, });
---- *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-appsync/README.md | 244 ++++++++++-- .../@aws-cdk/aws-appsync/lib/schema-base.ts | 153 ++++++++ .../@aws-cdk/aws-appsync/lib/schema-field.ts | 171 +++++++-- .../aws-appsync/lib/schema-intermediate.ts | 122 +++--- .../test/appsync-code-first.test.ts | 358 +----------------- .../test/appsync-interface-type.test.ts | 86 +++++ .../test/appsync-object-type.test.ts | 227 +++++++++++ .../test/appsync-scalar-type.test.ts | 228 +++++++++++ 8 files changed, 1119 insertions(+), 470 deletions(-) create mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts create mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts create mode 100644 packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index 96d0ce93d1879..d1f78b163d71c 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -180,7 +180,7 @@ api.grantMutation(role, 'updateExample'); api.grant(role, appsync.IamResource.ofType('Mutation', 'updateExample'), 'appsync:GraphQL'); ``` -### Code-First Schema +## Code-First Schema CDK offers the ability to generate your schema in a code-first approach. A code-first approach offers a developer workflow with: @@ -188,47 +188,129 @@ A code-first approach offers a developer workflow with: - **reusability**: simplifying down boilerplate/repetitive code - **consistency**: resolvers and schema definition will always be synced -The code-first approach allows for dynamic schema generation. You can generate your schema based on variables and templates to reduce code duplication. +The code-first approach allows for **dynamic** schema generation. You can generate your schema based on variables and templates to reduce code duplication. -#### Code-First Example +### Code-First Example -We are going to reference the [example](#Example) through a code-first approach. +To showcase the code-first approach. Let's try to model the following schema segment. + +```gql +interface Node { + id: String +} + +type Query { + allFilms(after: String, first: Int, before: String, last: Int): FilmConnection +} + +type FilmNode implements Node { + filmName: String +} + +type FilmConnection { + edges: [FilmEdge] + films: [Film] + totalCount: Int +} + +type FilmEdge { + node: Film + cursor: String +} +``` + +Above we see a schema that allows for generating paginated responses. For example, +we can query `allFilms(first: 100)` since `FilmConnection` acts as an intermediary +for holding `FilmEdges` we can write a resolver to return the first 100 films. + +In a separate file, we can declare our scalar types: `scalar-types.ts`. + +```ts +import { GraphqlType } from '@aws-cdk/aws-appsync'; + +export const string = appsync.GraphqlType.string(); +export const int = appsync.GraphqlType.int(); +``` + +In another separate file, we can declare our object types and related functions. +We will call this file `object-types.ts` and we will have created it in a way that +allows us to generate other `XxxConnection` and `XxxEdges` in the future. ```ts +const pluralize = require('pluralize'); +import * as scalar from './scalar-types.ts'; import * as appsync from '@aws-cdk/aws-appsync'; -import * as db from '@aws-cdk/aws-dynamodb'; + +export const args = { + after: scalar.string, + first: scalar.int, + before: scalar.string, + last: scalar.int, +}; + +export const Node = new appsync.InterfaceType('Node', { + definition: { id: scalar.string } +}); +export const FilmNode = new appsync.ObjectType.implementInterface('FilmNode', { + interfaceTypes: [Node], + definition: { filmName: scalar.string } +}); + +export function generateEdgeAndConnection(base: appsync.ObjectType) { + const edge = new appsync.ObjectType(`${base.name}Edge`, { + definition: { node: base.attribute(), cursor: scalar.string } + }); + const connection = new appsync.ObjectType(`${base.name}Connection`, { + definition: { + edges: edges.attribute({ isList: true }), + [pluralize(base.name)]: base.attribute({ isList: true }), + totalCount: scalar.int, + } + }); + return { edge: edge, connection: connection }; +} +``` + +Finally, we will go to our `cdk-stack` and combine everything together +to generate our schema. + +```ts +import * as appsync from '@aws-cdk/aws-appsync'; +import * as schema from './object-types'; const api = new appsync.GraphQLApi(stack, 'Api', { name: 'demo', schemaDefinition: appsync.SchemaDefinition.CODE, - authorizationConfig: { - defaultAuthorization: { - authorizationType: appsync.AuthorizationType.IAM - }, - }, -}); - -const demoTable = new db.Table(stack, 'DemoTable', { - partitionKey: { - name: 'id', - type: db.AttributeType.STRING, - }, }); -const demoDS = api.addDynamoDbDataSource('demoDataSource', 'Table for Demos', demoTable); +this.objectTypes = [ schema.Node, schema.Film ]; -// Schema Definition starts here +const filmConnections = schema.generateEdgeAndConnection(schema.Film); -const demo = api.addType('demo', { +api.addType('Query', { definition: { - id: appsync.GraphqlType.string({ isRequired: true }), - version: appsync.GraphqlType.string({ isRequired: true }), - }, -}); + allFilms: new appsync.ResolvableField(dummyDataSource, { + returnType: filmConnections.connection.attribute(), + args: schema.args, + requestMappingTemplate: dummyRequest, + responseMappingTemplate: dummyResponse, + }, + } + }); +}) +this.objectTypes.map((t) => api.appendToSchema(t)); +Object.keys(filmConnections).forEach((key) => api.appendToSchema(filmConnections[key])); ``` -#### GraphQL Types +Notice how we can utilize the `generateEdgeAndConnection` function to generate +Object Types. In the future, if we wanted to create more Object Types, we can simply +create the base Object Type (i.e. Film) and from there we can generate its respective +`Connections` and `Edges`. + +Check out a more in-depth example [here](https://github.com/BryanPan342/starwars-code-first). + +### GraphQL Types One of the benefits of GraphQL is its strongly typed nature. We define the types within an object, query, mutation, interface, etc. as **GraphQL Types**. @@ -236,17 +318,111 @@ types within an object, query, mutation, interface, etc. as **GraphQL Types**. GraphQL Types are the building blocks of types, whether they are scalar, objects, interfaces, etc. GraphQL Types can be: - [**Scalar Types**](https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html): Id, Int, String, AWSDate, etc. -- **Object Types**: types that you generate (i.e. `demo` from the example above) -- **Interface Types**: abstract types that define the base implementation of other +- [**Object Types**](#Object-Types): types that you generate (i.e. `demo` from the example above) +- [**Interface Types**](#Interface-Types): abstract types that define the base implementation of other Intermediate Types More concretely, GraphQL Types are simply the types appended to variables. Referencing the object type `Demo` in the previous example, the GraphQL Types is `String!` and is applied to both the names `id` and `version`. -#### Intermediate Types +### Field and Resolvable Fields + +While `GraphqlType` is a base implementation for GraphQL fields, we have abstractions +on top of `GraphqlType` that provide finer grain support. + +#### Field + +`Field` extends `GraphqlType` and will allow you to define arguments. [**Interface Types**](#Interface-Types) are not resolvable and this class will allow you to define arguments, +but not its resolvers. + +For example, if we want to create the following type: + +```gql +type Node { + test(argument: string): String +} +``` + +The CDK code required would be: + +```ts +const field = new appsync.Field({ + returnType: appsync.GraphqlType.string(), + args: { + argument: appsync.GraphqlType.string(), + }, +}); +const type = new appsync.InterfaceType('Node', { + definition: { test: field }, +}); +``` + +#### Resolvable Fields + +`ResolvableField` extends `Field` and will allow you to define arguments and its resolvers. +[**Object Types**](#Object-Types) can have fields that resolve and perform operations on +your backend. + +You can also create resolvable fields for object types. + +```gql +type Info { + node(id: String): String +} +``` + +The CDK code required would be: + +```ts +const info = new appsync.ObjectType('Info', { + definition: { + node: new appsync.ResolvableField({ + returnType: appsync.GraphqlType.string(), + args: { + id: appsync.GraphqlType.string(), + }, + dataSource: api.addNoneDataSource('none'), + requestMappingTemplate: dummyRequest, + responseMappingTemplate: dummyResponse, + }), + }, +}); +``` + +To nest resolvers, we can also create top level query types that call upon +other types. Building off the previous example, if we want the following graphql +type definition: + +```gql +type Query { + get(argument: string): Info +} +``` + +The CDK code required would be: + +```ts +const query = new appsync.ObjectType('Query', { + definition: { + get: new appsync.ResolvableField({ + returnType: appsync.GraphqlType.string(), + args: { + argument: appsync.GraphqlType.string(), + }, + dataSource: api.addNoneDataSource('none'), + requestMappingTemplate: dummyRequest, + responseMappingTemplate: dummyResponse, + }), + }, +}); +``` + +Learn more about fields and resolvers [here](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-overview.html). -Intermediate Types are abstractions above Scalar Types. They have a set of defined +### Intermediate Types + +Intermediate Types are defined by Graphql Types and Fields. They have a set of defined fields, where each field corresponds to another type in the system. Intermediate Types will be the meat of your GraphQL Schema as they are the types defined by you. @@ -254,7 +430,7 @@ Intermediate Types include: - [**Interface Types**](#Interface-Types) - [**Object Types**](#Object-Types) -#### Interface Types +### Interface Types **Interface Types** are abstract types that define the implementation of other intermediate types. They are useful for eliminating duplication and can be used @@ -269,7 +445,7 @@ const node = new appsync.InterfaceType('Node', { }); ``` -#### Object Types +### Object Types **Object Types** are types that you declare. For example, in the [code-first example](#code-first-example) the `demo` variable is an **Object Type**. **Object Types** are defined by @@ -297,7 +473,7 @@ You can create Object Types in three ways: `scalar-types.ts` - a file for scalar type definitions ```ts - export const required_string = new appsync.GraphqlType.string({ isRequired: true }); + export const required_string = appsync.GraphqlType.string({ isRequired: true }); ``` `object-types.ts` - a file for object type definitions @@ -324,7 +500,7 @@ You can create Object Types in three ways: id: appsync.GraphqlType.string({ isRequired: true }), }, }); - const demo = new appsync.ObjectType.implementInterface('Demo', { + const demo = new appsync.ObjectType('Demo', { interfaceTypes: [ node ], defintion: { version: appsync.GraphqlType.string({ isRequired: true }), @@ -347,4 +523,4 @@ You can create Object Types in three ways: }); ``` > This method provides easy use and is ideal for smaller projects. - \ No newline at end of file + diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts index 0e9c9b82910cc..c3f67fe46a595 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts @@ -1,3 +1,156 @@ +import { Resolver } from './resolver'; +import { ResolvableFieldOptions } from './schema-field'; +import { InterfaceType } from './schema-intermediate'; + +/** + * A Graphql Field + */ +export interface IField { + /** + * the type of attribute + */ + readonly type: Type; + + /** + * property determining if this attribute is a list + * i.e. if true, attribute would be `[Type]` + * + * @default false + */ + readonly isList: boolean; + + /** + * property determining if this attribute is non-nullable + * i.e. if true, attribute would be `Type!` and this attribute + * must always have a value + * + * @default false + */ + readonly isRequired: boolean; + + /** + * property determining if this attribute is a non-nullable list + * i.e. if true, attribute would be `[ Type ]!` and this attribute's + * list must always have a value + * + * @default false + */ + readonly isRequiredList: boolean; + + /** + * The options to make this field resolvable + * + * @default - not a resolvable field + */ + readonly fieldOptions?: ResolvableFieldOptions; + + /** + * the intermediate type linked to this attribute + * (i.e. an interface or an object) + * + * @default - no intermediate type + */ + readonly intermediateType?: IIntermediateType; + + /** + * Generate the string for this attribute + */ + toString(): string; + + /** + * Generate the arguments for this field + */ + argsToString(): string; +} + +/** + * Intermediate Types are types that includes a certain set of fields + * that define the entirety of your schema + */ +export interface IIntermediateType { + /** + * the name of this type + */ + readonly name: string; + + /** + * the attributes of this type + */ + readonly definition: { [key: string]: IField }; + + /** + * The Interface Types this Intermediate Type implements + * + * @default - no interface types + */ + readonly interfaceTypes?: InterfaceType[]; + + /** + * the directives for this object type + * + * @default - no directives + */ + readonly directives?: Directive[]; + + /** + * The resolvers linked to this data source + */ + resolvers?: Resolver[]; + + /** + * the intermediate type linked to this attribute + * (i.e. an interface or an object) + * + * @default - no intermediate type + */ + readonly intermediateType?: InterfaceType; + + /** + * Generate the string of this object type + */ + toString(): string; + + /** + * Add a field to this Intermediate Type + * + * @param fieldName - The name of the field + * @param field - the resolvable field to add + */ + addField(fieldName: string, field: IField): void; +} + +/** + * Directives for types + * + * i.e. @aws_iam or @aws_subscribe + * + * @experimental + */ +export class Directive { + /** + * Add the @aws_iam directive + */ + public static iam(): Directive { + return new Directive('@aws_iam'); + } + + /** + * Add a custom directive + * + * @param statement - the directive statement to append + */ + public static custom(statement: string): Directive { + return new Directive(statement); + } + + /** + * the directive statement + */ + public readonly statement: string; + + private constructor(statement: string) { this.statement = statement; } +} + /** * Enum containing the Types that can be used to define ObjectTypes */ diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts index de60b65f798c5..ba22dd085fe56 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-field.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-field.ts @@ -1,5 +1,6 @@ -import { Type } from './schema-base'; -import { InterfaceType } from './schema-intermediate'; +import { BaseDataSource } from './data-source'; +import { MappingTemplate } from './mapping-template'; +import { Type, IField, IIntermediateType } from './schema-base'; /** * Base options for GraphQL Types @@ -10,7 +11,7 @@ import { InterfaceType } from './schema-intermediate'; * * @experimental */ -export interface BaseGraphqlTypeOptions { +export interface BaseTypeOptions { /** * property determining if this attribute is a list * i.e. if true, attribute would be [Type] @@ -47,12 +48,12 @@ export interface BaseGraphqlTypeOptions { * * @experimental */ -export interface GraphqlTypeOptions extends BaseGraphqlTypeOptions { +export interface GraphqlTypeOptions extends BaseTypeOptions { /** * the intermediate type linked to this attribute * @default - no intermediate type */ - readonly intermediateType?: InterfaceType; + readonly intermediateType?: IIntermediateType; } /** @@ -64,7 +65,7 @@ export interface GraphqlTypeOptions extends BaseGraphqlTypeOptions { * * GraphQL Types are used to define the entirety of schema. */ -export class GraphqlType { +export class GraphqlType implements IField { /** * `ID` scalar type is a unique identifier. `ID` type is serialized similar to `String`. * @@ -75,7 +76,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static id(options?: BaseGraphqlTypeOptions): GraphqlType { + public static id(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.ID, options); } /** @@ -86,7 +87,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static string(options?: BaseGraphqlTypeOptions): GraphqlType { + public static string(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.STRING, options); } /** @@ -97,7 +98,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static int(options?: BaseGraphqlTypeOptions): GraphqlType { + public static int(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.INT, options); } /** @@ -108,7 +109,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static float(options?: BaseGraphqlTypeOptions): GraphqlType { + public static float(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.FLOAT, options); } /** @@ -119,7 +120,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static boolean(options?: BaseGraphqlTypeOptions): GraphqlType { + public static boolean(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.BOOLEAN, options); } @@ -133,7 +134,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsDate(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsDate(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_DATE, options); } /** @@ -146,7 +147,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsTime(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsTime(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_TIME, options); } /** @@ -159,7 +160,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsDateTime(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsDateTime(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_DATE_TIME, options); } /** @@ -172,7 +173,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsTimestamp(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsTimestamp(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_TIMESTAMP, options); } /** @@ -183,7 +184,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsEmail(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsEmail(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_EMAIL, options); } /** @@ -194,7 +195,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsJson(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsJson(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_JSON, options); } /** @@ -207,7 +208,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsUrl(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsUrl(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_URL, options); } /** @@ -220,7 +221,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsPhone(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsPhone(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_PHONE, options); } /** @@ -231,7 +232,7 @@ export class GraphqlType { * - isRequired * - isRequiredList */ - public static awsIpAddress(options?: BaseGraphqlTypeOptions): GraphqlType { + public static awsIpAddress(options?: BaseTypeOptions): GraphqlType { return new GraphqlType(Type.AWS_IP_ADDRESS, options); } @@ -289,9 +290,9 @@ export class GraphqlType { * * @default - no intermediate type */ - public readonly intermediateType?: InterfaceType; + public readonly intermediateType?: IIntermediateType; - private constructor(type: Type, options?: GraphqlTypeOptions) { + protected constructor(type: Type, options?: GraphqlTypeOptions) { this.type = type; this.isList = options?.isList ?? false; this.isRequired = options?.isRequired ?? false; @@ -313,4 +314,130 @@ export class GraphqlType { type = this.isRequiredList ? `${type}!` : type; return type; } + + /** + * Generate the arguments for this field + */ + public argsToString(): string { + return ''; + } +} + +/** + * Properties for configuring a field + * + * @options args - the variables and types that define the arguments + * + * i.e. { string: GraphqlType, string: GraphqlType } + */ +export interface FieldOptions { + /** + * The return type for this field + */ + readonly returnType: GraphqlType; + /** + * The arguments for this field. + * + * i.e. type Example (first: String second: String) {} + * - where 'first' and 'second' are key values for args + * and 'String' is the GraphqlType + * + * @default - no arguments + */ + readonly args?: { [key: string]: GraphqlType }; +} + +/** + * Fields build upon Graphql Types and provide typing + * and arguments. + */ +export class Field extends GraphqlType implements IField { + /** + * The options for this field + * + * @default - no arguments + */ + public readonly fieldOptions?: ResolvableFieldOptions; + + public constructor(options: FieldOptions) { + const props = { + isList: options.returnType.isList, + isRequired: options.returnType.isRequired, + isRequiredList: options.returnType.isRequiredList, + intermediateType: options.returnType.intermediateType, + }; + super(options.returnType.type, props); + this.fieldOptions = options; + } + + /** + * Generate the args string of this resolvable field + */ + public argsToString(): string { + if (!this.fieldOptions || !this.fieldOptions.args) { return ''; } + let args = '('; + Object.keys(this.fieldOptions?.args ?? {}).forEach((key) => { + const type = this.fieldOptions?.args?.[key].toString(); + args = `${args}${key}: ${type} `; + }); + args = args.slice(0, -1); + return `${args})`; + } +} + +/** + * Properties for configuring a resolvable field + * + * @options dataSource - the data source linked to this resolvable field + * @options requestMappingTemplate - the mapping template for requests to this resolver + * @options responseMappingTemplate - the mapping template for responses from this resolver + */ +export interface ResolvableFieldOptions extends FieldOptions { + /** + * The data source creating linked to this resolvable field + * + * @default - no data source + */ + readonly dataSource?: BaseDataSource; + /** + * configuration of the pipeline resolver + * + * @default - no pipeline resolver configuration + * An empty array or undefined prop will set resolver to be of type unit + */ + readonly pipelineConfig?: string[]; + /** + * The request mapping template for this resolver + * + * @default - No mapping template + */ + readonly requestMappingTemplate?: MappingTemplate; + /** + * The response mapping template for this resolver + * + * @default - No mapping template + */ + readonly responseMappingTemplate?: MappingTemplate; +} + +/** + * Resolvable Fields build upon Graphql Types and provide fields + * that can resolve into operations on a data source. + */ +export class ResolvableField extends Field implements IField { + /** + * The options to make this field resolvable + * + * @default - not a resolvable field + */ + public readonly fieldOptions?: ResolvableFieldOptions; + + public constructor(options: ResolvableFieldOptions) { + const props = { + returnType: options.returnType, + args: options.args, + }; + super(props); + this.fieldOptions = options; + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts index bfe562333014a..4102e506d013f 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts @@ -1,37 +1,6 @@ -import { BaseGraphqlTypeOptions, GraphqlType } from './schema-field'; - -/** - * Directives for types - * - * i.e. @aws_iam or @aws_subscribe - * - * @experimental - */ -export class Directive { - /** - * Add the @aws_iam directive - */ - public static iam(): Directive { - return new Directive('@aws_iam'); - } - - /** - * Add a custom directive - * - * @param statement - the directive statement to append - * Note: doesn't guarantee functionality - */ - public static custom(statement: string): Directive { - return new Directive(statement); - } - - /** - * the directive statement - */ - public readonly statement: string; - - private constructor(statement: string) { this.statement = statement; } -} +import { Resolver } from './resolver'; +import { Directive, IField, IIntermediateType } from './schema-base'; +import { BaseTypeOptions, GraphqlType, ResolvableFieldOptions } from './schema-field'; /** * Properties for configuring an Intermediate Type @@ -45,7 +14,7 @@ export interface IntermediateTypeProps { /** * the attributes of this type */ - readonly definition: { [key: string]: GraphqlType }; + readonly definition: { [key: string]: IField }; } /** @@ -54,7 +23,7 @@ export interface IntermediateTypeProps { * * @experimental */ -export class InterfaceType { +export class InterfaceType implements IIntermediateType { /** * the name of this type */ @@ -62,7 +31,7 @@ export class InterfaceType { /** * the attributes of this type */ - public readonly definition: { [key: string]: GraphqlType }; + public readonly definition: { [key: string]: IField }; public constructor(name: string, props: IntermediateTypeProps) { this.name = name; @@ -77,7 +46,7 @@ export class InterfaceType { * - isRequired * - isRequiredList */ - public attribute(options?: BaseGraphqlTypeOptions): GraphqlType { + public attribute(options?: BaseTypeOptions): GraphqlType { return GraphqlType.intermediate({ isList: options?.isList, isRequired: options?.isRequired, @@ -93,10 +62,21 @@ export class InterfaceType { let schemaAddition = `interface ${this.name} {\n`; Object.keys(this.definition).forEach( (key) => { const attribute = this.definition[key]; - schemaAddition = `${schemaAddition} ${key}: ${attribute.toString()}\n`; + const args = attribute.argsToString(); + schemaAddition = `${schemaAddition} ${key}${args}: ${attribute.toString()}\n`; }); return `${schemaAddition}}`; } + + /** + * Add a field to this Object Type + * + * @param fieldName - The name of the field + * @param field - the field to add + */ + public addField(fieldName: string, field: IField): void { + this.definition[fieldName] = field; + } } /** @@ -129,22 +109,7 @@ export interface ObjectTypeProps extends IntermediateTypeProps { * * @experimental */ -export class ObjectType extends InterfaceType { - /** - * A method to define Object Types from an interface - */ - public static implementInterface(name: string, props: ObjectTypeProps): ObjectType { - if (!props.interfaceTypes || !props.interfaceTypes.length) { - throw new Error('Static function `implementInterface` requires an interfaceType to implement'); - } - return new ObjectType(name, { - interfaceTypes: props.interfaceTypes, - definition: props.interfaceTypes.reduce((def, interfaceType) => { - return Object.assign({}, def, interfaceType.definition); - }, props.definition), - directives: props.directives, - }); - } +export class ObjectType extends InterfaceType implements IIntermediateType { /** * The Interface Types this Object Type implements * @@ -157,11 +122,37 @@ export class ObjectType extends InterfaceType { * @default - no directives */ public readonly directives?: Directive[]; + /** + * The resolvers linked to this data source + */ + public resolvers?: Resolver[]; public constructor(name: string, props: ObjectTypeProps) { - super(name, props); + const options = { + definition: props.interfaceTypes?.reduce((def, interfaceType) => { + return Object.assign({}, def, interfaceType.definition); + }, props.definition) ?? props.definition, + }; + super(name, options); this.interfaceTypes = props.interfaceTypes; this.directives = props.directives; + this.resolvers = []; + + Object.keys(this.definition).forEach((fieldName) => { + const field = this.definition[fieldName]; + this.generateResolver(fieldName, field.fieldOptions); + }); + } + + /** + * Add a field to this Object Type + * + * @param fieldName - The name of the field + * @param field - the resolvable field to add + */ + public addField(fieldName: string, field: IField): void { + this.generateResolver(fieldName, field.fieldOptions); + this.definition[fieldName] = field; } /** @@ -180,7 +171,8 @@ export class ObjectType extends InterfaceType { let schemaAddition = `type ${title} ${directives}{\n`; Object.keys(this.definition).forEach( (key) => { const attribute = this.definition[key]; - schemaAddition = `${schemaAddition} ${key}: ${attribute.toString()}\n`; + const args = attribute.argsToString(); + schemaAddition = `${schemaAddition} ${key}${args}: ${attribute.toString()}\n`; }); return `${schemaAddition}}`; } @@ -200,4 +192,20 @@ export class ObjectType extends InterfaceType { }); return schemaAddition; } + + /** + * Generate the resolvers linked to this Object Type + */ + protected generateResolver(fieldName: string, options?: ResolvableFieldOptions): void { + if (options?.dataSource) { + if (!this.resolvers) { this.resolvers = []; } + this.resolvers.push(options.dataSource.createResolver({ + typeName: this.name, + fieldName: fieldName, + pipelineConfig: options.pipelineConfig, + requestMappingTemplate: options.requestMappingTemplate, + responseMappingTemplate: options.responseMappingTemplate, + })); + } + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts index 079342f95c34f..8258bbf38010e 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts @@ -35,360 +35,4 @@ describe('testing addType for schema definition mode `code`', () => { }); }); -}); - -describe('testing all GraphQL Types', () => { - test('scalar type id', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.id, - }, - }); - const out = 'type Test {\n id: ID\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type string', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.string, - }, - }); - const out = 'type Test {\n id: String\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type int', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.int, - }, - }); - const out = 'type Test {\n id: Int\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type float', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.float, - }, - }); - const out = 'type Test {\n id: Float\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type boolean', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.boolean, - }, - }); - const out = 'type Test {\n id: Boolean\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSDate', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsDate, - }, - }); - const out = 'type Test {\n id: AWSDate\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSTime', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsTime, - }, - }); - const out = 'type Test {\n id: AWSTime\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSDateTime', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsDateTime, - }, - }); - const out = 'type Test {\n id: AWSDateTime\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSTimestamp', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsTimestamp, - }, - }); - const out = 'type Test {\n id: AWSTimestamp\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSEmail', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsEmail, - }, - }); - const out = 'type Test {\n id: AWSEmail\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSJSON', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsJson, - }, - }); - const out = 'type Test {\n id: AWSJSON\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - - test('scalar type AWSUrl', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsUrl, - }, - }); - const out = 'type Test {\n id: AWSURL\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSPhone', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsPhone, - }, - }); - const out = 'type Test {\n id: AWSPhone\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('scalar type AWSIPAddress', () => { - // WHEN - api.addType('Test', { - definition: { - id: t.awsIpAddress, - }, - }); - const out = 'type Test {\n id: AWSIPAddress\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); -}); - -describe('testing InterfaceType properties', () => { - let baseTest: appsync.InterfaceType; - beforeEach(()=>{ - baseTest = new appsync.InterfaceType('baseTest', { - definition: { - id: t.id, - }, - }); - }); - test('basic InterfaceType produces correct schema', () => { - // WHEN - api.appendToSchema(baseTest.toString()); - const out = 'interface baseTest {\n id: ID\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('Interface Type can be a Graphql Type', () => { - // WHEN - const graphqlType = baseTest.attribute(); - - const test = new appsync.ObjectType('Test', { - definition: { - test: graphqlType, - }, - }); - api.appendToSchema(test.toString()); - const out = 'type Test {\n test: baseTest\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); -}); - -describe('testing Object Type properties', () => { - - test('errors when no InterfaceTypes are specified', () => { - // THEN - expect(() => { - appsync.ObjectType.implementInterface('objectTest', { - definition: { - id2: t.id, - }, - }); - }).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); - }); - - test('errors when implementing empty InterfaceTypes properties', () => { - // THEN - expect(() => { - appsync.ObjectType.implementInterface('objectTest', { - interfaceTypes: [], - definition: { - id2: t.id, - }, - }); - }).toThrowError('Static function `implementInterface` requires an interfaceType to implement'); - }); - - test('ObjectType can implement from interface types', () => { - // WHEN - const baseTest = new appsync.InterfaceType('baseTest', { - definition: { - id: t.id, - }, - }); - const objectTest = appsync.ObjectType.implementInterface('objectTest', { - interfaceTypes: [baseTest], - definition: { - id2: t.id, - }, - directives: [appsync.Directive.custom('@test')], - }); - - api.appendToSchema(baseTest.toString()); - api.appendToSchema(objectTest.toString()); - const gql_interface = 'interface baseTest {\n id: ID\n}\n'; - const gql_object = 'type objectTest implements baseTest @test {\n id2: ID\n id: ID\n}\n'; - const out = `${gql_interface}${gql_object}`; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('ObjectType can implement from multiple interface types', () => { - // WHEN - const baseTest = new appsync.InterfaceType('baseTest', { - definition: { id: t.id }, - }); - const anotherTest = new appsync.InterfaceType('anotherTest', { - definition: { id2: t.id }, - }); - const objectTest = appsync.ObjectType.implementInterface('objectTest', { - interfaceTypes: [anotherTest, baseTest], - definition: { - id3: t.id, - }, - }); - - api.appendToSchema(baseTest.toString()); - api.appendToSchema(anotherTest.toString()); - api.appendToSchema(objectTest.toString()); - - const gql_interface = 'interface baseTest {\n id: ID\n}\ninterface anotherTest {\n id2: ID\n}\n'; - const gql_object = 'type objectTest implements anotherTest, baseTest {\n id3: ID\n id2: ID\n id: ID\n}\n'; - const out = `${gql_interface}${gql_object}`; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); - - test('Object Type can be a Graphql Type', () => { - // WHEN - const baseTest = new appsync.ObjectType('baseTest', { - definition: { - id: t.id, - }, - }); - const graphqlType = baseTest.attribute(); - const test = new appsync.ObjectType('Test', { - definition: { - test: graphqlType, - }, - }); - api.appendToSchema(test.toString()); - const out = 'type Test {\n test: baseTest\n}\n'; - - // THEN - expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { - Definition: `${out}`, - }); - }); -}); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts new file mode 100644 index 0000000000000..f6b2c35d31c2c --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts @@ -0,0 +1,86 @@ +import '@aws-cdk/assert/jest'; +import * as cdk from '@aws-cdk/core'; +import * as appsync from '../lib'; +import * as t from './scalar-type-defintions'; + +let stack: cdk.Stack; +let api: appsync.GraphQLApi; +beforeEach(() => { + // GIVEN + stack = new cdk.Stack(); + api = new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.CODE, + }); +}); + +describe('testing InterfaceType properties', () => { + let baseTest: appsync.InterfaceType; + beforeEach(()=>{ + baseTest = new appsync.InterfaceType('baseTest', { + definition: { + id: t.id, + }, + }); + }); + test('basic InterfaceType produces correct schema', () => { + // WHEN + api.appendToSchema(baseTest.toString()); + const out = 'interface baseTest {\n id: ID\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('InterfaceType fields can have arguments', () => { + // WHEN + baseTest.addField('test', new appsync.Field({ + returnType: t.string, + args: { success: t.int }, + })); + api.appendToSchema(baseTest.toString()); + const out = 'interface baseTest {\n id: ID\n test(success: Int): String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('InterfaceType fields will not produce resolvers', () => { + // WHEN + baseTest.addField('test', new appsync.ResolvableField({ + returnType: t.string, + args: { success: t.int }, + dataSource: api.addNoneDataSource('none'), + })); + api.appendToSchema(baseTest.toString()); + const out = 'interface baseTest {\n id: ID\n test(success: Int): String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + expect(stack).not.toHaveResource('AWS::AppSync::Resolver'); + }); + + test('Interface Type can be a Graphql Type', () => { + // WHEN + const graphqlType = baseTest.attribute(); + + const test = new appsync.ObjectType('Test', { + definition: { + test: graphqlType, + }, + }); + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: baseTest\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); +}); \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts new file mode 100644 index 0000000000000..1d4359b735697 --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts @@ -0,0 +1,227 @@ +import '@aws-cdk/assert/jest'; +import * as cdk from '@aws-cdk/core'; +import * as appsync from '../lib'; +import * as t from './scalar-type-defintions'; + +let stack: cdk.Stack; +let api: appsync.GraphQLApi; +beforeEach(() => { + // GIVEN + stack = new cdk.Stack(); + api = new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.CODE, + }); +}); + +describe('testing Object Type properties', () => { + test('ObjectType can implement from interface types', () => { + // WHEN + const baseTest = new appsync.InterfaceType('baseTest', { + definition: { + id: t.id, + }, + }); + const objectTest = new appsync.ObjectType('objectTest', { + interfaceTypes: [baseTest], + definition: { + id2: t.id, + }, + directives: [appsync.Directive.custom('@test')], + }); + + api.appendToSchema(baseTest.toString()); + api.appendToSchema(objectTest.toString()); + const gql_interface = 'interface baseTest {\n id: ID\n}\n'; + const gql_object = 'type objectTest implements baseTest @test {\n id2: ID\n id: ID\n}\n'; + const out = `${gql_interface}${gql_object}`; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('ObjectType can implement from multiple interface types', () => { + // WHEN + const baseTest = new appsync.InterfaceType('baseTest', { + definition: { id: t.id }, + }); + const anotherTest = new appsync.InterfaceType('anotherTest', { + definition: { id2: t.id }, + }); + const objectTest = new appsync.ObjectType('objectTest', { + interfaceTypes: [anotherTest, baseTest], + definition: { + id3: t.id, + }, + }); + + api.appendToSchema(baseTest.toString()); + api.appendToSchema(anotherTest.toString()); + api.appendToSchema(objectTest.toString()); + + const gql_interface = 'interface baseTest {\n id: ID\n}\ninterface anotherTest {\n id2: ID\n}\n'; + const gql_object = 'type objectTest implements anotherTest, baseTest {\n id3: ID\n id2: ID\n id: ID\n}\n'; + const out = `${gql_interface}${gql_object}`; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('Object Type can be a Graphql Type', () => { + // WHEN + const baseTest = new appsync.ObjectType('baseTest', { + definition: { + id: t.id, + }, + }); + const graphqlType = baseTest.attribute(); + const test = new appsync.ObjectType('Test', { + definition: { + test: graphqlType, + }, + }); + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: baseTest\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('Object Type can implement Resolvable Field in definition', () => { + // WHEN + const field = new appsync.ResolvableField({ + returnType: t.string, + dataSource: api.addNoneDataSource('none'), + args: { + arg: t.int, + }, + }); + const test = new appsync.ObjectType('Test', { + definition: { + test: t.string, + resolve: field, + }, + }); + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: String\n resolve(arg: Int): String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('Object Type can implement Resolvable Field from GraphqlType', () => { + // WHEN + const field = new appsync.ResolvableField({ + returnType: t.string, + dataSource: api.addNoneDataSource('none'), + args: { + arg: t.int, + }, + }); + const test = new appsync.ObjectType('Test', { + definition: { + test: t.string, + resolve: field, + }, + }); + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: String\n resolve(arg: Int): String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('Object Type can implement Resolvable Field for pipelineResolvers', () => { + // WHEN + const test = new appsync.ObjectType('Test', { + definition: { + resolve: new appsync.ResolvableField({ + returnType: t.string, + dataSource: api.addNoneDataSource('none'), + args: { + arg: t.int, + }, + pipelineConfig: ['test', 'test'], + }), + }, + }); + api.appendToSchema(test.toString()); + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::Resolver', { + Kind: 'PIPELINE', + PipelineConfig: { Functions: ['test', 'test'] }, + }); + }); + + test('Object Type can dynamically add Fields', () => { + // WHEN + const field = new appsync.ResolvableField({ + returnType: t.string, + dataSource: api.addNoneDataSource('none'), + args: { + arg: t.int, + }, + }); + const test = new appsync.ObjectType('Test', { + definition: { + test: t.string, + }, + }); + test.addField('resolve', field); + // test.addField('resolve', field); + test.addField('dynamic', t.string); + + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: String\n resolve(arg: Int): String\n dynamic: String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + expect(stack).toHaveResource('AWS::AppSync::Resolver'); + }); + + test('Object Type can dynamically add Fields', () => { + // WHEN + const garbage = new appsync.InterfaceType('Garbage', { + definition: { + garbage: t.string, + }, + }); + const test = new appsync.ObjectType('Test', { + definition: { + test: t.string, + }, + }); + const field = new appsync.ResolvableField({ + returnType: garbage.attribute(), + dataSource: api.addNoneDataSource('none'), + args: { + arg: garbage.attribute(), + }, + }); + test.addField('resolve', field); + // test.addField('resolve', field); + test.addField('dynamic', garbage.attribute()); + + api.appendToSchema(test.toString()); + const out = 'type Test {\n test: String\n resolve(arg: Garbage): Garbage\n dynamic: Garbage\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + expect(stack).toHaveResource('AWS::AppSync::Resolver'); + }); +}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts new file mode 100644 index 0000000000000..fb8165384d8b6 --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts @@ -0,0 +1,228 @@ +import '@aws-cdk/assert/jest'; +import * as cdk from '@aws-cdk/core'; +import * as appsync from '../lib'; +import * as t from './scalar-type-defintions'; + +let stack: cdk.Stack; +let api: appsync.GraphQLApi; +beforeEach(() => { + // GIVEN + stack = new cdk.Stack(); + api = new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schemaDefinition: appsync.SchemaDefinition.CODE, + }); +}); + +describe('testing all GraphQL Types', () => { + test('scalar type id', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.id, + }, + }); + const out = 'type Test {\n id: ID\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type string', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.string, + }, + }); + const out = 'type Test {\n id: String\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type int', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.int, + }, + }); + const out = 'type Test {\n id: Int\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type float', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.float, + }, + }); + const out = 'type Test {\n id: Float\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type boolean', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.boolean, + }, + }); + const out = 'type Test {\n id: Boolean\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSDate', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsDate, + }, + }); + const out = 'type Test {\n id: AWSDate\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSTime', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsTime, + }, + }); + const out = 'type Test {\n id: AWSTime\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSDateTime', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsDateTime, + }, + }); + const out = 'type Test {\n id: AWSDateTime\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSTimestamp', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsTimestamp, + }, + }); + const out = 'type Test {\n id: AWSTimestamp\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSEmail', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsEmail, + }, + }); + const out = 'type Test {\n id: AWSEmail\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSJSON', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsJson, + }, + }); + const out = 'type Test {\n id: AWSJSON\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + + test('scalar type AWSUrl', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsUrl, + }, + }); + const out = 'type Test {\n id: AWSURL\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSPhone', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsPhone, + }, + }); + const out = 'type Test {\n id: AWSPhone\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('scalar type AWSIPAddress', () => { + // WHEN + api.addType('Test', { + definition: { + id: t.awsIpAddress, + }, + }); + const out = 'type Test {\n id: AWSIPAddress\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); +}); \ No newline at end of file From 6beff8feda2c4f3e4265e3bee1a99f059ac625b2 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Tue, 25 Aug 2020 11:18:17 +0200 Subject: [PATCH 25/42] chore(ec2): remove unneeded override LookedUpVpc.vpnGatewayId (#9955) The `vpnGatewayId` property is already declared as a dynamic property (a getter) in `VpcBase`, and it is being overridden by a "plain" property declaration. This pattern is disallowed in TypeScript 4 due to the risk of runtime errors when this is done incorrectly (see more details in microsoft/TypeScript#37894). In any case, the override was likely a mistake, as no value was ever set to the overridden property (values were correctly set on `this._vpnGatewayId`, which backs the dynamic getter on `VpcBase`). ---- *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-ec2/lib/vpc.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@aws-cdk/aws-ec2/lib/vpc.ts b/packages/@aws-cdk/aws-ec2/lib/vpc.ts index 6fa50c0de2175..c0b65abee39df 100644 --- a/packages/@aws-cdk/aws-ec2/lib/vpc.ts +++ b/packages/@aws-cdk/aws-ec2/lib/vpc.ts @@ -1790,7 +1790,6 @@ class ImportedVpc extends VpcBase { class LookedUpVpc extends VpcBase { public readonly vpcId: string; - public readonly vpnGatewayId: string | undefined; public readonly internetConnectivityEstablished: IDependable = new ConcreteDependable(); public readonly availabilityZones: string[]; public readonly publicSubnets: ISubnet[]; From 1cf986d56f2cc8b72f94f4a7b52a309790ce4722 Mon Sep 17 00:00:00 2001 From: joel-aws <57411589+joel-aws@users.noreply.github.com> Date: Tue, 25 Aug 2020 05:42:43 -0400 Subject: [PATCH 26/42] feat(cli): automatically determine region on EC2 instances (#9313) Enables EC2 instances to automatically determine their current region by querying the Instance Metadata Service (IMDS). Both IMDSv1 and v2 are supported. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../lib/api/aws-auth/awscli-compatible.ts | 182 +++++++++++++----- .../aws-cdk/lib/api/aws-auth/sdk-provider.ts | 12 +- packages/aws-cdk/test/diff.test.ts | 4 +- packages/aws-cdk/test/util.ts | 29 ++- .../test/util/awscli-compatible.test.ts | 29 +++ 5 files changed, 205 insertions(+), 51 deletions(-) create mode 100644 packages/aws-cdk/test/util/awscli-compatible.test.ts diff --git a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts index 90c0a6bc67c30..6d85e08310128 100644 --- a/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts +++ b/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts @@ -31,13 +31,9 @@ export class AwsCliCompatible { * 3. Respects $AWS_SHARED_CREDENTIALS_FILE. * 4. Respects $AWS_DEFAULT_PROFILE in addition to $AWS_PROFILE. */ - public static async credentialChain( - profile: string | undefined, - ec2creds: boolean | undefined, - containerCreds: boolean | undefined, - httpOptions: AWS.HTTPOptions | undefined) { + public static async credentialChain(options: CredentialChainOptions = {}) { - profile = profile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; + const profile = options.profile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; const sources = [ () => new AWS.EnvironmentCredentials('AWS'), @@ -48,12 +44,17 @@ export class AwsCliCompatible { // Force reading the `config` file if it exists by setting the appropriate // environment variable. await forceSdkToReadConfigIfPresent(); - sources.push(() => new AWS.SharedIniFileCredentials({ profile, filename: credentialsFileName(), httpOptions, tokenCodeFn })); + sources.push(() => new AWS.SharedIniFileCredentials({ + profile, + filename: credentialsFileName(), + httpOptions: options.httpOptions, + tokenCodeFn, + })); } - if (containerCreds ?? hasEcsCredentials()) { + if (options.containerCreds ?? hasEcsCredentials()) { sources.push(() => new AWS.ECSCredentials()); - } else if (ec2creds ?? await hasEc2Credentials()) { + } else if (options.ec2instance ?? await isEc2Instance()) { // else if: don't get EC2 creds if we should have gotten ECS creds--ECS instances also // run on EC2 boxes but the creds represent something different. Same behavior as // upstream code. @@ -75,11 +76,9 @@ export class AwsCliCompatible { * 2. $AWS_DEFAULT_PROFILE and $AWS_DEFAULT_REGION are also respected. * * Lambda and CodeBuild set the $AWS_REGION variable. - * - * FIXME: EC2 instances require querying the metadata service to determine the current region. */ - public static async region(profile: string | undefined): Promise { - profile = profile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; + public static async region(options: RegionOptions = {}): Promise { + const profile = options.profile || process.env.AWS_PROFILE || process.env.AWS_DEFAULT_PROFILE || 'default'; // Defaults inside constructor const toCheck = [ @@ -92,14 +91,36 @@ export class AwsCliCompatible { process.env.AWS_DEFAULT_REGION || process.env.AMAZON_DEFAULT_REGION; while (!region && toCheck.length > 0) { - const options = toCheck.shift()!; - if (await fs.pathExists(options.filename)) { - const configFile = new SharedIniFile(options); - const section = await configFile.getProfile(options.profile); + const opts = toCheck.shift()!; + if (await fs.pathExists(opts.filename)) { + const configFile = new SharedIniFile(opts); + const section = await configFile.getProfile(opts.profile); region = section?.region; } } + if (!region && (options.ec2instance ?? await isEc2Instance())) { + debug('Looking up AWS region in the EC2 Instance Metadata Service (IMDS).'); + const imdsOptions = { + httpOptions: { timeout: 1000, connectTimeout: 1000 }, maxRetries: 2, + }; + const metadataService = new AWS.MetadataService(imdsOptions); + + let token; + try { + token = await getImdsV2Token(metadataService); + } catch (e) { + debug(`No IMDSv2 token: ${e}`); + } + + try { + region = await getRegionFromImds(metadataService, token); + debug(`AWS region from IMDS: ${region}`); + } catch (e) { + debug(`Unable to retrieve AWS region from IMDS: ${e}`); + } + } + if (!region) { const usedProfile = !profile ? '' : ` (profile: "${profile}")`; region = 'us-east-1'; // This is what the AWS CLI does @@ -120,39 +141,96 @@ function hasEcsCredentials(): boolean { /** * Return whether we're on an EC2 instance */ -async function hasEc2Credentials() { - debug("Determining whether we're on an EC2 instance."); - - let instance = false; - if (process.platform === 'win32') { - // https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/identify_ec2_instances.html - const result = await util.promisify(child_process.exec)('wmic path win32_computersystemproduct get uuid', { encoding: 'utf-8' }); - // output looks like - // UUID - // EC2AE145-D1DC-13B2-94ED-01234ABCDEF - const lines = result.stdout.toString().split('\n'); - instance = lines.some(x => matchesRegex(/^ec2/i, x)); - } else { - // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.html - const files: Array<[string, RegExp]> = [ - // This recognizes the Xen hypervisor based instances (pre-5th gen) - ['/sys/hypervisor/uuid', /^ec2/i], - - // This recognizes the new Hypervisor (5th-gen instances and higher) - // Can't use the advertised file '/sys/devices/virtual/dmi/id/product_uuid' because it requires root to read. - // Instead, sys_vendor contains something like 'Amazon EC2'. - ['/sys/devices/virtual/dmi/id/sys_vendor', /ec2/i], - ]; - for (const [file, re] of files) { - if (matchesRegex(re, readIfPossible(file))) { - instance = true; - break; +async function isEc2Instance() { + if (isEc2InstanceCache === undefined) { + debug("Determining if we're on an EC2 instance."); + let instance = false; + if (process.platform === 'win32') { + // https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/identify_ec2_instances.html + const result = await util.promisify(child_process.exec)('wmic path win32_computersystemproduct get uuid', { encoding: 'utf-8' }); + // output looks like + // UUID + // EC2AE145-D1DC-13B2-94ED-01234ABCDEF + const lines = result.stdout.toString().split('\n'); + instance = lines.some(x => matchesRegex(/^ec2/i, x)); + } else { + // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify_ec2_instances.html + const files: Array<[string, RegExp]> = [ + // This recognizes the Xen hypervisor based instances (pre-5th gen) + ['/sys/hypervisor/uuid', /^ec2/i], + + // This recognizes the new Hypervisor (5th-gen instances and higher) + // Can't use the advertised file '/sys/devices/virtual/dmi/id/product_uuid' because it requires root to read. + // Instead, sys_vendor contains something like 'Amazon EC2'. + ['/sys/devices/virtual/dmi/id/sys_vendor', /ec2/i], + ]; + for (const [file, re] of files) { + if (matchesRegex(re, readIfPossible(file))) { + instance = true; + break; + } } } + debug(instance ? 'Looks like an EC2 instance.' : 'Does not look like an EC2 instance.'); + isEc2InstanceCache = instance; } + return isEc2InstanceCache; +} + + +let isEc2InstanceCache: boolean | undefined = undefined; - debug(instance ? 'Looks like EC2 instance.' : 'Does not look like EC2 instance.'); - return instance; +/** + * Attempts to get a Instance Metadata Service V2 token + */ +async function getImdsV2Token(metadataService: AWS.MetadataService): Promise { + debug('Attempting to retrieve an IMDSv2 token.'); + return new Promise((resolve, reject) => { + metadataService.request( + '/latest/api/token', + { + method: 'PUT', + headers: { 'x-aws-ec2-metadata-token-ttl-seconds': '60' }, + }, + (err: AWS.AWSError, token: string | undefined) => { + if (err) { + reject(err); + } else if (!token) { + reject(new Error('IMDS did not return a token.')); + } else { + resolve(token); + } + }); + }); +} + +/** + * Attempts to get the region from the Instance Metadata Service + */ +async function getRegionFromImds(metadataService: AWS.MetadataService, token: string | undefined): Promise { + debug('Retrieving the AWS region from the IMDS.'); + let options: { method?: string | undefined; headers?: { [key: string]: string; } | undefined; } = {}; + if (token) { + options = { headers: { 'x-aws-ec2-metadata-token': token } }; + } + return new Promise((resolve, reject) => { + metadataService.request( + '/latest/dynamic/instance-identity/document', + options, + (err: AWS.AWSError, instanceIdentityDocument: string | undefined) => { + if (err) { + reject(err); + } else if (!instanceIdentityDocument) { + reject(new Error('IMDS did not return an Instance Identity Document.')); + } else { + try { + resolve(JSON.parse(instanceIdentityDocument).region); + } catch (e) { + reject(e); + } + } + }); + }); } function homeDir() { @@ -201,6 +279,18 @@ function readIfPossible(filename: string): string | undefined { } } +export interface CredentialChainOptions { + readonly profile?: string; + readonly ec2instance?: boolean; + readonly containerCreds?: boolean; + readonly httpOptions?: AWS.HTTPOptions; +} + +export interface RegionOptions { + readonly profile?: string; + readonly ec2instance?: boolean; +} + /** * Ask user for MFA token for given serial * diff --git a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts index ab583611bbc52..6ea65afece5e7 100644 --- a/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts +++ b/packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts @@ -96,8 +96,16 @@ export class SdkProvider { public static async withAwsCliCompatibleDefaults(options: SdkProviderOptions = {}) { const sdkOptions = parseHttpOptions(options.httpOptions ?? {}); - const chain = await AwsCliCompatible.credentialChain(options.profile, options.ec2creds, options.containerCreds, sdkOptions.httpOptions); - const region = await AwsCliCompatible.region(options.profile); + const chain = await AwsCliCompatible.credentialChain({ + profile: options.profile, + ec2instance: options.ec2creds, + containerCreds: options.containerCreds, + httpOptions: sdkOptions.httpOptions, + }); + const region = await AwsCliCompatible.region({ + profile: options.profile, + ec2instance: options.ec2creds, + }); return new SdkProvider(chain, region, sdkOptions); } diff --git a/packages/aws-cdk/test/diff.test.ts b/packages/aws-cdk/test/diff.test.ts index b283b884b6a4f..b5bd12ac0472f 100644 --- a/packages/aws-cdk/test/diff.test.ts +++ b/packages/aws-cdk/test/diff.test.ts @@ -4,7 +4,7 @@ import * as cxschema from '@aws-cdk/cloud-assembly-schema'; import { CloudFormationStackArtifact } from '@aws-cdk/cx-api'; import { CloudFormationDeployments } from '../lib/api/cloudformation-deployments'; import { CdkToolkit } from '../lib/cdk-toolkit'; -import { classMockOf, MockCloudExecutable } from './util'; +import { instanceMockFrom, MockCloudExecutable } from './util'; let cloudExecutable: MockCloudExecutable; let cloudFormation: jest.Mocked; @@ -39,7 +39,7 @@ beforeEach(() => { }], }); - cloudFormation = classMockOf(CloudFormationDeployments); + cloudFormation = instanceMockFrom(CloudFormationDeployments); toolkit = new CdkToolkit({ cloudExecutable, diff --git a/packages/aws-cdk/test/util.ts b/packages/aws-cdk/test/util.ts index f6966e8737711..f21f3c4abd8d3 100644 --- a/packages/aws-cdk/test/util.ts +++ b/packages/aws-cdk/test/util.ts @@ -126,10 +126,37 @@ export function testStack(stack: TestStackArtifact) { * automatic detection of properties (as those exist on instances, not * classes). */ -export function classMockOf(ctr: new (...args: any[]) => A): jest.Mocked { +export function instanceMockFrom(ctr: new (...args: any[]) => A): jest.Mocked { const ret: any = {}; for (const methodName of Object.getOwnPropertyNames(ctr.prototype)) { ret[methodName] = jest.fn(); } return ret; } + +/** + * Run an async block with a class (constructor) replaced with a mock + * + * The class constructor will be replaced with a constructor that returns + * a singleton, and the singleton will be passed to the block so that its + * methods can be mocked individually. + * + * Uses `instanceMockFrom` so is subject to the same limitations that hold + * for that function. + */ +export async function withMockedClassSingleton( + obj: A, + key: K, + cb: (mock: A[K] extends jest.Constructable ? jest.Mocked> : never) => Promise, +): Promise { + + const original = obj[key]; + try { + const mock = instanceMockFrom(original as any); + obj[key] = jest.fn().mockReturnValue(mock) as any; + const ret = await cb(mock as any); + return ret; + } finally { + obj[key] = original; + } +} \ No newline at end of file diff --git a/packages/aws-cdk/test/util/awscli-compatible.test.ts b/packages/aws-cdk/test/util/awscli-compatible.test.ts new file mode 100644 index 0000000000000..42cfc37e54c30 --- /dev/null +++ b/packages/aws-cdk/test/util/awscli-compatible.test.ts @@ -0,0 +1,29 @@ +import * as AWS from 'aws-sdk'; +import { AwsCliCompatible } from '../../lib/api/aws-auth/awscli-compatible'; +import { withMockedClassSingleton } from '../util'; + +beforeEach(() => { + // Set to paths that don't exist so the SDK doesn't accidentally load this config + process.env.AWS_CONFIG_FILE = '/home/dummydummy/.bxt/config'; + process.env.AWS_SHARED_CREDENTIALS_FILE = '/home/dummydummy/.bxt/credentials'; + // Scrub some environment variables that might be set if we're running on CodeBuild which will interfere with the tests. + delete process.env.AWS_REGION; + delete process.env.AWS_DEFAULT_REGION; + delete process.env.AWS_ACCESS_KEY_ID; + delete process.env.AWS_SECRET_ACCESS_KEY; + delete process.env.AWS_SESSION_TOKEN; +}); + +test('on an EC2 instance, region lookup queries IMDS', async () => { + return withMockedClassSingleton(AWS, 'MetadataService', async (mdService) => { + mdService.request + // First call for a token + .mockImplementationOnce((_1, _2, cb) => { cb(undefined as any, 'token'); }) + // Second call for the region + .mockImplementationOnce((_1, _2, cb) => { cb(undefined as any, JSON.stringify({ region: 'some-region' })); }); + + const region = await AwsCliCompatible.region({ ec2instance: true }); + expect(region).toEqual('some-region'); + }); +}); + From 6da6581c91e3f6fae83e45f7d374a42407e57a2f Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Tue, 25 Aug 2020 12:07:21 +0200 Subject: [PATCH 27/42] feat(custom-resources): function name for AwsCustomResource (#9774) Add the `functionName` prop to customize the name of the Lambda function implementing the custom resource. Closes #9771 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/custom-resources/README.md | 5 +++-- .../aws-custom-resource.ts | 9 ++++++++ .../aws-custom-resource.test.ts | 21 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/custom-resources/README.md b/packages/@aws-cdk/custom-resources/README.md index 4716300d48244..27356889bb848 100644 --- a/packages/@aws-cdk/custom-resources/README.md +++ b/packages/@aws-cdk/custom-resources/README.md @@ -385,8 +385,8 @@ Since a successful resource provisioning might or might not produce outputs, thi In both the cases, you will get a synth time error if you attempt to use it in conjunction with `ignoreErrorCodesMatching`. ### Customizing the Lambda function implementing the custom resource -Use the `role`, `timeout` and `logRetention` properties to customize the Lambda function implementing the custom -resource: +Use the `role`, `timeout`, `logRetention` and `functionName` properties to customize +the Lambda function implementing the custom resource: ```ts new AwsCustomResource(this, 'Customized', { @@ -394,6 +394,7 @@ new AwsCustomResource(this, 'Customized', { role: myRole, // must be assumable by the `lambda.amazonaws.com` service principal timeout: cdk.Duration.minutes(10) // defaults to 2 minutes logRetention: logs.RetentionDays.ONE_WEEK // defaults to never delete logs + functionName: 'my-custom-name', // defaults to a CloudFormation generated name }) ``` diff --git a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts index 64ca3f4fd25e1..37f61ccb65260 100644 --- a/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts +++ b/packages/@aws-cdk/custom-resources/lib/aws-custom-resource/aws-custom-resource.ts @@ -254,6 +254,14 @@ export interface AwsCustomResourceProps { * @default true */ readonly installLatestAwsSdk?: boolean; + + /** + * A name for the Lambda function implementing this custom resource. + * + * @default - AWS CloudFormation generates a unique physical ID and uses that + * ID for the function's name. For more information, see Name Type. + */ + readonly functionName?: string; } /** @@ -312,6 +320,7 @@ export class AwsCustomResource extends cdk.Construct implements iam.IGrantable { timeout: props.timeout || cdk.Duration.minutes(2), role: props.role, logRetention: props.logRetention, + functionName: props.functionName, }); this.grantPrincipal = provider.grantPrincipal; diff --git a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts index 29076526a39cc..184e72c4ed4ca 100644 --- a/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts +++ b/packages/@aws-cdk/custom-resources/test/aws-custom-resource/aws-custom-resource.test.ts @@ -543,3 +543,24 @@ test('disable AWS SDK installation', () => { 'InstallLatestAwsSdk': false, }); }); + +test('can specify function name', () => { + // GIVEN + const stack = new cdk.Stack(); + + // WHEN + new AwsCustomResource(stack, 'AwsSdk', { + onCreate: { + service: 'service', + action: 'action', + physicalResourceId: PhysicalResourceId.of('id'), + }, + policy: AwsCustomResourcePolicy.fromSdkCalls({ resources: AwsCustomResourcePolicy.ANY_RESOURCE }), + functionName: 'my-cool-function', + }); + + // THEN + expect(stack).toHaveResource('AWS::Lambda::Function', { + FunctionName: 'my-cool-function', + }); +}); From 0ca09a75f3104a7e0d0e66a4b89496158fcbeee8 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 25 Aug 2020 12:32:15 +0200 Subject: [PATCH 28/42] fix(core): Duration incorrectly renders Days (#9935) We used to render all periods as `PT...`, but the correct formatting is `P(days)T(hms)`. Fixes #9906. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/state-transition-metrics.test.ts | 5 +- .../aws-stepfunctions/test/task-base.test.ts | 11 +- .../aws-stepfunctions/test/task.test.ts | 11 +- .../aws-synthetics/test/metric.test.ts | 20 ++-- packages/@aws-cdk/core/lib/duration.ts | 102 +++++++++--------- packages/@aws-cdk/core/test/test.duration.ts | 28 +++-- 6 files changed, 88 insertions(+), 89 deletions(-) diff --git a/packages/@aws-cdk/aws-stepfunctions/test/state-transition-metrics.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/state-transition-metrics.test.ts index 59a66b15a8445..fa8b54bc6df9f 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/state-transition-metrics.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/state-transition-metrics.test.ts @@ -44,11 +44,10 @@ describe('State Transition Metrics', () => { }); function verifyTransitionMetric(metric: Metric, metricName: string, statistic: string) { - expect(metric).toEqual({ - period: { amount: 5, unit: { label: 'minutes', inMillis: 60000 } }, + expect(metric).toEqual(expect.objectContaining({ dimensions: { ServiceMetric: 'StateTransition' }, namespace: 'AWS/States', metricName, statistic, - }); + })); } diff --git a/packages/@aws-cdk/aws-stepfunctions/test/task-base.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/task-base.test.ts index 3778eb6716b30..a57e78ae85c6d 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/task-base.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/task-base.test.ts @@ -265,18 +265,11 @@ describe('Task base', () => { }); function verifyMetric(metric: Metric, metricName: string, statistic: string) { - expect(metric).toEqual({ - period: { - amount: 5, - unit: { - label: 'minutes', - inMillis: 60000, - }, - }, + expect(metric).toEqual(expect.objectContaining({ namespace: 'AWS/States', metricName, statistic, - }); + })); } function render(sm: sfn.IChainable) { diff --git a/packages/@aws-cdk/aws-stepfunctions/test/task.test.ts b/packages/@aws-cdk/aws-stepfunctions/test/task.test.ts index 623ee29689308..06dc0282c9c05 100644 --- a/packages/@aws-cdk/aws-stepfunctions/test/task.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions/test/task.test.ts @@ -98,21 +98,14 @@ describe('Task state', () => { }); function verifyMetric(metric: Metric, metricName: string, statistic: string) { - expect(metric).toEqual({ + expect(metric).toEqual(expect.objectContaining({ metricName, namespace: 'AWS/States', - period: { - amount: 5, - unit: { - inMillis: 60000, - label: 'minutes', - }, - }, statistic, dimensions: { Arn: 'resource', }, - }); + })); } class FakeTask implements sfn.IStepFunctionsTask { diff --git a/packages/@aws-cdk/aws-synthetics/test/metric.test.ts b/packages/@aws-cdk/aws-synthetics/test/metric.test.ts index bcdd3da9e9e0f..fa5ce1cc51687 100644 --- a/packages/@aws-cdk/aws-synthetics/test/metric.test.ts +++ b/packages/@aws-cdk/aws-synthetics/test/metric.test.ts @@ -19,29 +19,26 @@ test('.metricXxx() methods can be used to obtain Metrics for the canary', () => const metricDuration = canary.metricDuration(); // THEN - expect(metricSuccess).toEqual({ - period: { amount: 5, unit: { inMillis: 60000, label: 'minutes' } }, + expect(metricSuccess).toEqual(expect.objectContaining({ dimensions: { CanaryName: canary.canaryName }, namespace: 'CloudWatchSynthetics', metricName: 'SuccessPercent', statistic: 'Average', - }); + })); - expect(metricFailed).toEqual({ - period: { amount: 5, unit: { inMillis: 60000, label: 'minutes' } }, + expect(metricFailed).toEqual(expect.objectContaining({ dimensions: { CanaryName: canary.canaryName }, namespace: 'CloudWatchSynthetics', metricName: 'Failed', statistic: 'Average', - }); + })); - expect(metricDuration).toEqual({ - period: { amount: 5, unit: { inMillis: 60000, label: 'minutes' } }, + expect(metricDuration).toEqual(expect.objectContaining({ dimensions: { CanaryName: canary.canaryName }, namespace: 'CloudWatchSynthetics', metricName: 'Duration', statistic: 'Average', - }); + })); }); test('Metric can specify statistic', () => { @@ -59,11 +56,10 @@ test('Metric can specify statistic', () => { const metric = canary.metricFailed({ statistic: 'Sum' }); // THEN - expect(metric).toEqual({ - period: { amount: 5, unit: { inMillis: 60000, label: 'minutes' } }, + expect(metric).toEqual(expect.objectContaining({ dimensions: { CanaryName: canary.canaryName }, namespace: 'CloudWatchSynthetics', metricName: 'Failed', statistic: 'Sum', - }); + })); }); diff --git a/packages/@aws-cdk/core/lib/duration.ts b/packages/@aws-cdk/core/lib/duration.ts index 9039b6a6ee936..098744af2d0b8 100644 --- a/packages/@aws-cdk/core/lib/duration.ts +++ b/packages/@aws-cdk/core/lib/duration.ts @@ -67,7 +67,7 @@ export class Duration { * @returns the parsed `Duration`. */ public static parse(duration: string): Duration { - const matches = duration.match(/^PT(?:(\d+)D)?(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?$/); + const matches = duration.match(/^P(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/); if (!matches) { throw new Error(`Not a valid ISO duration: ${duration}`); } @@ -157,31 +157,30 @@ export class Duration { /** * Return an ISO 8601 representation of this period * - * @returns a string starting with 'PT' describing the period + * @returns a string starting with 'P' describing the period * @see https://www.iso.org/fr/standard/70907.html */ public toIsoString(): string { if (this.amount === 0) { return 'PT0S'; } - switch (this.unit) { - case TimeUnit.Milliseconds: - return Duration.seconds(this.amount / 1000.0).toIsoString(); - case TimeUnit.Seconds: - return `PT${this.fractionDuration('S', 60, Duration.minutes)}`; - case TimeUnit.Minutes: - return `PT${this.fractionDuration('M', 60, Duration.hours)}`; - case TimeUnit.Hours: - return `PT${this.fractionDuration('H', 24, Duration.days)}`; - case TimeUnit.Days: - return `PT${this.amount}D`; - default: - throw new Error(`Unexpected time unit: ${this.unit}`); + + const ret = ['P']; + let tee = false; + + for (const [amount, unit] of this.components(true)) { + if ([TimeUnit.Seconds, TimeUnit.Minutes, TimeUnit.Hours].includes(unit) && !tee) { + ret.push('T'); + tee = true; + } + ret.push(`${amount}${unit.isoLabel}`); } + + return ret.join(''); } /** * Return an ISO 8601 representation of this period * - * @returns a string starting with 'PT' describing the period + * @returns a string starting with 'P' describing the period * @see https://www.iso.org/fr/standard/70907.html * @deprecated Use `toIsoString()` instead. */ @@ -196,24 +195,11 @@ export class Duration { if (this.amount === 0) { return fmtUnit(0, this.unit); } if (Token.isUnresolved(this.amount)) { return ` ${this.unit.label}`; } - let millis = convert(this.amount, this.unit, TimeUnit.Milliseconds, { integral: false }); - const parts = new Array(); - - for (const unit of [TimeUnit.Days, TimeUnit.Hours, TimeUnit.Hours, TimeUnit.Minutes, TimeUnit.Seconds]) { - const wholeCount = Math.floor(convert(millis, TimeUnit.Milliseconds, unit, { integral: false })); - if (wholeCount > 0) { - parts.push(fmtUnit(wholeCount, unit)); - millis -= wholeCount * unit.inMillis; - } - } - - // Remainder in millis - if (millis > 0) { - parts.push(fmtUnit(millis, TimeUnit.Milliseconds)); - } - - // 2 significant parts, that's totally enough for humans - return parts.slice(0, 2).join(' '); + return this.components(false) + // 2 significant parts, that's totally enough for humans + .slice(0, 2) + .map(([amount, unit]) => fmtUnit(amount, unit)) + .join(' '); function fmtUnit(amount: number, unit: TimeUnit) { if (amount === 1) { @@ -238,15 +224,33 @@ export class Duration { ); } - private fractionDuration(symbol: string, modulus: number, next: (amount: number) => Duration): string { - if (this.amount < modulus) { - return `${this.amount}${symbol}`; + /** + * Return the duration in a set of whole numbered time components, ordered from largest to smallest + * + * Only components != 0 will be returned. + * + * Can combine millis and seconds together for the benefit of toIsoString, + * makes the logic in there simpler. + */ + private components(combineMillisWithSeconds: boolean): Array<[number, TimeUnit]> { + const ret = new Array<[number, TimeUnit]>(); + let millis = convert(this.amount, this.unit, TimeUnit.Milliseconds, { integral: false }); + + for (const unit of [TimeUnit.Days, TimeUnit.Hours, TimeUnit.Minutes, TimeUnit.Seconds]) { + const count = convert(millis, TimeUnit.Milliseconds, unit, { integral: false }); + // Round down to a whole number UNLESS we're combining millis and seconds and we got to the seconds + const wholeCount = unit === TimeUnit.Seconds && combineMillisWithSeconds ? count : Math.floor(count); + if (wholeCount > 0) { + ret.push([wholeCount, unit]); + millis -= wholeCount * unit.inMillis; + } } - const remainder = this.amount % modulus; - const quotient = next((this.amount - remainder) / modulus).toISOString().slice(2); - return remainder > 0 - ? `${quotient}${remainder}${symbol}` - : quotient; + + // Remainder in millis + if (millis > 0) { + ret.push([millis, TimeUnit.Milliseconds]); + } + return ret; } } @@ -264,13 +268,13 @@ export interface TimeConversionOptions { } class TimeUnit { - public static readonly Milliseconds = new TimeUnit('millis', 1); - public static readonly Seconds = new TimeUnit('seconds', 1_000); - public static readonly Minutes = new TimeUnit('minutes', 60_000); - public static readonly Hours = new TimeUnit('hours', 3_600_000); - public static readonly Days = new TimeUnit('days', 86_400_000); + public static readonly Milliseconds = new TimeUnit('millis', '', 1); + public static readonly Seconds = new TimeUnit('seconds', 'S', 1_000); + public static readonly Minutes = new TimeUnit('minutes', 'M', 60_000); + public static readonly Hours = new TimeUnit('hours', 'H', 3_600_000); + public static readonly Days = new TimeUnit('days', 'D', 86_400_000); - private constructor(public readonly label: string, public readonly inMillis: number) { + private constructor(public readonly label: string, public readonly isoLabel: string, public readonly inMillis: number) { // MAX_SAFE_INTEGER is 2^53, so by representing our duration in millis (the lowest // common unit) the highest duration we can represent is // 2^53 / 86*10^6 ~= 104 * 10^6 days (about 100 million days). @@ -300,4 +304,4 @@ function convert(amount: number, fromUnit: TimeUnit, toUnit: TimeUnit, { integra */ function finestUnit(a: TimeUnit, b: TimeUnit) { return a.inMillis < b.inMillis ? a : b; -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/core/test/test.duration.ts b/packages/@aws-cdk/core/test/test.duration.ts index 7746591249cab..dd3305f7ea945 100644 --- a/packages/@aws-cdk/core/test/test.duration.ts +++ b/packages/@aws-cdk/core/test/test.duration.ts @@ -88,9 +88,9 @@ export = nodeunit.testCase({ test.equal(Duration.seconds(5).toISOString(), 'PT5S'); test.equal(Duration.minutes(5).toISOString(), 'PT5M'); test.equal(Duration.hours(5).toISOString(), 'PT5H'); - test.equal(Duration.days(5).toISOString(), 'PT5D'); + test.equal(Duration.days(5).toISOString(), 'P5D'); - test.equal(Duration.seconds(1 + 60 * (1 + 60 * (1 + 24))).toISOString(), 'PT1D1H1M1S'); + test.equal(Duration.seconds(1 + 60 * (1 + 60 * (1 + 24))).toISOString(), 'P1DT1H1M1S'); test.done(); }, @@ -106,9 +106,10 @@ export = nodeunit.testCase({ test.equal(Duration.seconds(5).toIsoString(), 'PT5S'); test.equal(Duration.minutes(5).toIsoString(), 'PT5M'); test.equal(Duration.hours(5).toIsoString(), 'PT5H'); - test.equal(Duration.days(5).toIsoString(), 'PT5D'); + test.equal(Duration.days(5).toIsoString(), 'P5D'); - test.equal(Duration.seconds(1 + 60 * (1 + 60 * (1 + 24))).toIsoString(), 'PT1D1H1M1S'); + test.equal(Duration.seconds(65).toIsoString(), 'PT1M5S'); + test.equal(Duration.seconds(1 + 60 * (1 + 60 * (1 + 24))).toIsoString(), 'P1DT1H1M1S'); test.done(); }, @@ -117,14 +118,27 @@ export = nodeunit.testCase({ test.equal(Duration.parse('PT0S').toSeconds(), 0); test.equal(Duration.parse('PT0M').toSeconds(), 0); test.equal(Duration.parse('PT0H').toSeconds(), 0); - test.equal(Duration.parse('PT0D').toSeconds(), 0); + test.equal(Duration.parse('P0D').toSeconds(), 0); test.equal(Duration.parse('PT5S').toSeconds(), 5); test.equal(Duration.parse('PT5M').toSeconds(), 300); test.equal(Duration.parse('PT5H').toSeconds(), 18_000); - test.equal(Duration.parse('PT5D').toSeconds(), 432_000); + test.equal(Duration.parse('P5D').toSeconds(), 432_000); - test.equal(Duration.parse('PT1D1H1M1S').toSeconds(), 1 + 60 * (1 + 60 * (1 + 24))); + test.equal(Duration.parse('P1DT1H1M1S').toSeconds(), 1 + 60 * (1 + 60 * (1 + 24))); + + test.done(); + }, + + 'reject illegal parses'(test: nodeunit.Test) { + const err = 'Not a valid ISO duration'; + test.throws(() => { + Duration.parse('PT1D'); + }, err); + + test.throws(() => { + Duration.parse('P5S'); + }, err); test.done(); }, From 01de3350dc2ff61beb542124404e57385980d396 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Tue, 25 Aug 2020 13:10:04 +0200 Subject: [PATCH 29/42] chore: opt out of project references for MonoCDK (#8625) When building MonoCDK, `jsii` generates project references for all the discovered dependencies, which will then make the TypeScript compiler re-validate them before building. This effort is however unnecessary since those dependencies are actually not used during compilation! This adds a new `pkglint` rule to require explicit configuration of the `jsii.projectReferences` parameter in `package.json`, instead of always enabling it in `cdk-build`. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/alexa-ask/package.json | 3 ++- packages/@aws-cdk/app-delivery/package.json | 3 ++- packages/@aws-cdk/assets/package.json | 3 ++- .../@aws-cdk/aws-accessanalyzer/package.json | 3 ++- packages/@aws-cdk/aws-acmpca/package.json | 3 ++- packages/@aws-cdk/aws-amazonmq/package.json | 3 ++- packages/@aws-cdk/aws-amplify/package.json | 3 ++- packages/@aws-cdk/aws-apigateway/package.json | 3 ++- .../@aws-cdk/aws-apigatewayv2/package.json | 3 ++- packages/@aws-cdk/aws-appconfig/package.json | 3 ++- .../aws-applicationautoscaling/package.json | 3 ++- packages/@aws-cdk/aws-appmesh/package.json | 3 ++- packages/@aws-cdk/aws-appstream/package.json | 3 ++- packages/@aws-cdk/aws-appsync/package.json | 3 ++- packages/@aws-cdk/aws-athena/package.json | 3 ++- .../aws-autoscaling-common/package.json | 3 ++- .../aws-autoscaling-hooktargets/package.json | 3 ++- .../@aws-cdk/aws-autoscaling/package.json | 3 ++- .../aws-autoscalingplans/package.json | 3 ++- packages/@aws-cdk/aws-backup/package.json | 3 ++- packages/@aws-cdk/aws-batch/package.json | 3 ++- packages/@aws-cdk/aws-budgets/package.json | 3 ++- packages/@aws-cdk/aws-cassandra/package.json | 3 ++- packages/@aws-cdk/aws-ce/package.json | 3 ++- .../aws-certificatemanager/package.json | 3 ++- packages/@aws-cdk/aws-chatbot/package.json | 3 ++- packages/@aws-cdk/aws-cloud9/package.json | 3 ++- .../@aws-cdk/aws-cloudformation/package.json | 3 ++- .../aws-cloudfront-origins/package.json | 3 ++- packages/@aws-cdk/aws-cloudfront/package.json | 3 ++- packages/@aws-cdk/aws-cloudtrail/package.json | 3 ++- .../aws-cloudwatch-actions/package.json | 3 ++- packages/@aws-cdk/aws-cloudwatch/package.json | 3 ++- packages/@aws-cdk/aws-codebuild/package.json | 3 ++- packages/@aws-cdk/aws-codecommit/package.json | 3 ++- packages/@aws-cdk/aws-codedeploy/package.json | 3 ++- .../aws-codeguruprofiler/package.json | 3 ++- .../aws-codepipeline-actions/package.json | 3 ++- .../@aws-cdk/aws-codepipeline/package.json | 3 ++- packages/@aws-cdk/aws-codestar/package.json | 3 ++- .../aws-codestarconnections/package.json | 3 ++- .../aws-codestarnotifications/package.json | 3 ++- packages/@aws-cdk/aws-cognito/package.json | 3 ++- packages/@aws-cdk/aws-config/package.json | 3 ++- .../@aws-cdk/aws-datapipeline/package.json | 3 ++- packages/@aws-cdk/aws-dax/package.json | 3 ++- packages/@aws-cdk/aws-detective/package.json | 3 ++- .../aws-directoryservice/package.json | 3 ++- packages/@aws-cdk/aws-dlm/package.json | 3 ++- packages/@aws-cdk/aws-dms/package.json | 3 ++- packages/@aws-cdk/aws-docdb/package.json | 3 ++- .../@aws-cdk/aws-dynamodb-global/package.json | 3 ++- packages/@aws-cdk/aws-dynamodb/package.json | 3 ++- packages/@aws-cdk/aws-ec2/package.json | 3 ++- packages/@aws-cdk/aws-ecr-assets/package.json | 3 ++- packages/@aws-cdk/aws-ecr/package.json | 3 ++- .../@aws-cdk/aws-ecs-patterns/package.json | 3 ++- packages/@aws-cdk/aws-ecs/package.json | 3 ++- packages/@aws-cdk/aws-efs/package.json | 3 ++- packages/@aws-cdk/aws-eks-legacy/package.json | 3 ++- packages/@aws-cdk/aws-eks/package.json | 3 ++- .../@aws-cdk/aws-elasticache/package.json | 3 ++- .../aws-elasticbeanstalk/package.json | 3 ++- .../aws-elasticloadbalancing/package.json | 3 ++- .../package.json | 3 ++- .../package.json | 3 ++- .../aws-elasticloadbalancingv2/package.json | 3 ++- .../@aws-cdk/aws-elasticsearch/package.json | 3 ++- packages/@aws-cdk/aws-emr/package.json | 3 ++- .../@aws-cdk/aws-events-targets/package.json | 3 ++- packages/@aws-cdk/aws-events/package.json | 3 ++- .../@aws-cdk/aws-eventschemas/package.json | 3 ++- packages/@aws-cdk/aws-fms/package.json | 3 ++- packages/@aws-cdk/aws-fsx/package.json | 3 ++- packages/@aws-cdk/aws-gamelift/package.json | 3 ++- .../aws-globalaccelerator/package.json | 3 ++- packages/@aws-cdk/aws-glue/package.json | 3 ++- packages/@aws-cdk/aws-greengrass/package.json | 3 ++- packages/@aws-cdk/aws-guardduty/package.json | 3 ++- packages/@aws-cdk/aws-iam/package.json | 3 ++- .../@aws-cdk/aws-imagebuilder/package.json | 3 ++- packages/@aws-cdk/aws-inspector/package.json | 3 ++- packages/@aws-cdk/aws-iot/package.json | 3 ++- packages/@aws-cdk/aws-iot1click/package.json | 3 ++- .../@aws-cdk/aws-iotanalytics/package.json | 3 ++- packages/@aws-cdk/aws-iotevents/package.json | 3 ++- .../@aws-cdk/aws-iotthingsgraph/package.json | 3 ++- packages/@aws-cdk/aws-kinesis/package.json | 3 ++- .../aws-kinesisanalytics/package.json | 3 ++- .../@aws-cdk/aws-kinesisfirehose/package.json | 3 ++- packages/@aws-cdk/aws-kms/package.json | 3 ++- .../@aws-cdk/aws-lakeformation/package.json | 3 ++- .../aws-lambda-destinations/package.json | 3 ++- .../aws-lambda-event-sources/package.json | 3 ++- .../@aws-cdk/aws-lambda-nodejs/package.json | 3 ++- .../@aws-cdk/aws-lambda-python/package.json | 3 ++- packages/@aws-cdk/aws-lambda/package.json | 3 ++- .../aws-logs-destinations/package.json | 3 ++- packages/@aws-cdk/aws-logs/package.json | 3 ++- packages/@aws-cdk/aws-macie/package.json | 3 ++- .../aws-managedblockchain/package.json | 3 ++- .../@aws-cdk/aws-mediaconvert/package.json | 3 ++- packages/@aws-cdk/aws-medialive/package.json | 3 ++- packages/@aws-cdk/aws-mediastore/package.json | 3 ++- packages/@aws-cdk/aws-msk/package.json | 3 ++- packages/@aws-cdk/aws-neptune/package.json | 3 ++- .../@aws-cdk/aws-networkmanager/package.json | 3 ++- packages/@aws-cdk/aws-opsworks/package.json | 3 ++- packages/@aws-cdk/aws-opsworkscm/package.json | 3 ++- packages/@aws-cdk/aws-pinpoint/package.json | 3 ++- .../@aws-cdk/aws-pinpointemail/package.json | 3 ++- packages/@aws-cdk/aws-qldb/package.json | 3 ++- packages/@aws-cdk/aws-ram/package.json | 3 ++- packages/@aws-cdk/aws-rds/package.json | 3 ++- packages/@aws-cdk/aws-redshift/package.json | 3 ++- .../@aws-cdk/aws-resourcegroups/package.json | 3 ++- packages/@aws-cdk/aws-robomaker/package.json | 3 ++- .../aws-route53-patterns/package.json | 3 ++- .../@aws-cdk/aws-route53-targets/package.json | 3 ++- packages/@aws-cdk/aws-route53/package.json | 3 ++- .../@aws-cdk/aws-route53resolver/package.json | 3 ++- packages/@aws-cdk/aws-s3-assets/package.json | 3 ++- .../@aws-cdk/aws-s3-deployment/package.json | 3 ++- .../aws-s3-notifications/package.json | 3 ++- packages/@aws-cdk/aws-s3/package.json | 3 ++- packages/@aws-cdk/aws-sagemaker/package.json | 3 ++- packages/@aws-cdk/aws-sam/package.json | 3 ++- packages/@aws-cdk/aws-sdb/package.json | 3 ++- .../@aws-cdk/aws-secretsmanager/package.json | 3 ++- .../@aws-cdk/aws-securityhub/package.json | 3 ++- .../@aws-cdk/aws-servicecatalog/package.json | 3 ++- .../aws-servicediscovery/package.json | 3 ++- .../@aws-cdk/aws-ses-actions/package.json | 3 ++- packages/@aws-cdk/aws-ses/package.json | 3 ++- .../aws-sns-subscriptions/package.json | 3 ++- packages/@aws-cdk/aws-sns/package.json | 3 ++- packages/@aws-cdk/aws-sqs/package.json | 3 ++- packages/@aws-cdk/aws-ssm/package.json | 3 ++- .../aws-stepfunctions-tasks/package.json | 3 ++- .../@aws-cdk/aws-stepfunctions/package.json | 3 ++- packages/@aws-cdk/aws-synthetics/package.json | 3 ++- packages/@aws-cdk/aws-transfer/package.json | 3 ++- packages/@aws-cdk/aws-waf/package.json | 3 ++- .../@aws-cdk/aws-wafregional/package.json | 3 ++- packages/@aws-cdk/aws-wafv2/package.json | 3 ++- packages/@aws-cdk/aws-workspaces/package.json | 3 ++- .../@aws-cdk/cdk-assets-schema/package.json | 3 ++- .../build-tools/create-missing-libraries.ts | 1 + .../cloud-assembly-schema/package.json | 3 ++- .../cloudformation-include/package.json | 3 ++- packages/@aws-cdk/core/package.json | 3 ++- .../@aws-cdk/custom-resources/package.json | 3 ++- packages/@aws-cdk/cx-api/package.json | 3 ++- .../example-construct-library/package.json | 3 ++- packages/@aws-cdk/pipelines/package.json | 3 ++- packages/@aws-cdk/region-info/package.json | 3 ++- .../@monocdk-experiment/assert/tsconfig.json | 5 ++++- packages/monocdk-experiment/package.json | 3 ++- tools/cdk-build-tools/bin/cdk-watch.ts | 2 +- tools/cdk-build-tools/lib/package-info.ts | 2 +- tools/pkglint/lib/rules.ts | 20 +++++++++++++++++++ 161 files changed, 339 insertions(+), 159 deletions(-) diff --git a/packages/@aws-cdk/alexa-ask/package.json b/packages/@aws-cdk/alexa-ask/package.json index b941255e02954..c59b0dd73cc1b 100644 --- a/packages/@aws-cdk/alexa-ask/package.json +++ b/packages/@aws-cdk/alexa-ask/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.alexa-ask", "module": "aws_cdk.alexa_ask" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 016b2a151ff1e..00baa5b032e52 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -25,7 +25,8 @@ "module": "aws_cdk.app_delivery" } }, - "outdir": "dist" + "outdir": "dist", + "projectReferences": true }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 92cae774b8353..1ce947d1eb9a5 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.assets", "module": "aws_cdk.assets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-accessanalyzer/package.json b/packages/@aws-cdk/aws-accessanalyzer/package.json index b513d3b0954a6..e0d0dc9d3b1db 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/package.json +++ b/packages/@aws-cdk/aws-accessanalyzer/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-accessanalyzer", "module": "aws_cdk.aws_accessanalyzer" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-acmpca/package.json b/packages/@aws-cdk/aws-acmpca/package.json index 9a38379aa34c3..a5fda9769fe62 100644 --- a/packages/@aws-cdk/aws-acmpca/package.json +++ b/packages/@aws-cdk/aws-acmpca/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-acmpca", "module": "aws_cdk.aws_acmpca" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-amazonmq/package.json b/packages/@aws-cdk/aws-amazonmq/package.json index 4b1b93d7d268a..7654fec455161 100644 --- a/packages/@aws-cdk/aws-amazonmq/package.json +++ b/packages/@aws-cdk/aws-amazonmq/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-amazonmq", "module": "aws_cdk.aws_amazonmq" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json index db112e8886c5a..623448e0430af 100644 --- a/packages/@aws-cdk/aws-amplify/package.json +++ b/packages/@aws-cdk/aws-amplify/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-amplify", "module": "aws_cdk.aws_amplify" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index 668185ab89589..805dab5974747 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-apigateway", "module": "aws_cdk.aws_apigateway" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index d136d4e9c4ce2..789bf0c24a3f8 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-apigatewayv2", "module": "aws_cdk.aws_apigatewayv2" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appconfig/package.json b/packages/@aws-cdk/aws-appconfig/package.json index 075cbadd2b42d..9996390cf63a8 100644 --- a/packages/@aws-cdk/aws-appconfig/package.json +++ b/packages/@aws-cdk/aws-appconfig/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-appconfig", "module": "aws_cdk.aws_appconfig" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 51bc9b8813d45..1c1b9353d762d 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-applicationautoscaling", "module": "aws_cdk.aws_applicationautoscaling" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index d917e0ffccb98..37765b7b86cc6 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-appmesh", "module": "aws_cdk.aws_appmesh" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appstream/package.json b/packages/@aws-cdk/aws-appstream/package.json index ace96ac5c84ce..1a84b389466fc 100644 --- a/packages/@aws-cdk/aws-appstream/package.json +++ b/packages/@aws-cdk/aws-appstream/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-appstream", "module": "aws_cdk.aws_appstream" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 84bc2d3af6f7f..3f6e83e9a742c 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-appsync", "module": "aws_cdk.aws_appsync" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index 337a2890ef389..04373eb81fd52 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-athena", "module": "aws_cdk.aws_athena" } - } + }, + "projectReferences": true }, "cdk-build": { "cloudformation": "AWS::Athena", diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index ec3b5affa8cc1..71c9ac58ae59b 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-autoscaling-common", "module": "aws_cdk.aws_autoscaling_common" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index f10c7c41ccb7b..4da040eed9bd7 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-autoscaling-hooktargets", "module": "aws_cdk.aws_autoscaling_hooktargets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 42362006391c9..8651cb7c27ba2 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-autoscaling", "module": "aws_cdk.aws_autoscaling" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-autoscalingplans/package.json b/packages/@aws-cdk/aws-autoscalingplans/package.json index fb38d6163ae88..73241a14455ef 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/package.json +++ b/packages/@aws-cdk/aws-autoscalingplans/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-autoscalingplans", "module": "aws_cdk.aws_autoscalingplans" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-backup/package.json b/packages/@aws-cdk/aws-backup/package.json index 43461ce79359f..413589e9917fe 100644 --- a/packages/@aws-cdk/aws-backup/package.json +++ b/packages/@aws-cdk/aws-backup/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-backup", "module": "aws_cdk.aws_backup" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index 958c8a3b3ab96..dfd0d2e866e8f 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-batch", "module": "aws_cdk.aws_batch" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-budgets/package.json b/packages/@aws-cdk/aws-budgets/package.json index 72264798000e0..1a912435b703e 100644 --- a/packages/@aws-cdk/aws-budgets/package.json +++ b/packages/@aws-cdk/aws-budgets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-budgets", "module": "aws_cdk.aws_budgets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cassandra/package.json b/packages/@aws-cdk/aws-cassandra/package.json index d3fcec51cfd72..38acd5d388b30 100644 --- a/packages/@aws-cdk/aws-cassandra/package.json +++ b/packages/@aws-cdk/aws-cassandra/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cassandra", "module": "aws_cdk.aws_cassandra" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ce/package.json b/packages/@aws-cdk/aws-ce/package.json index a3ca1ae162847..5ffd08fcc3ea9 100644 --- a/packages/@aws-cdk/aws-ce/package.json +++ b/packages/@aws-cdk/aws-ce/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ce", "module": "aws_cdk.aws_ce" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-certificatemanager/package.json b/packages/@aws-cdk/aws-certificatemanager/package.json index 000d643df48ec..ebd5112e02224 100644 --- a/packages/@aws-cdk/aws-certificatemanager/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-certificatemanager", "module": "aws_cdk.aws_certificatemanager" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-chatbot/package.json b/packages/@aws-cdk/aws-chatbot/package.json index a2e805d6dea09..490d51ea95424 100644 --- a/packages/@aws-cdk/aws-chatbot/package.json +++ b/packages/@aws-cdk/aws-chatbot/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-chatbot", "module": "aws_cdk.aws_chatbot" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloud9/package.json b/packages/@aws-cdk/aws-cloud9/package.json index 8bb9f055c5d9d..36186a33fa827 100644 --- a/packages/@aws-cdk/aws-cloud9/package.json +++ b/packages/@aws-cdk/aws-cloud9/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloud9", "module": "aws_cdk.aws_cloud9" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index f458900221640..a5ad8b4909d92 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudformation", "module": "aws_cdk.aws_cloudformation" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index dd3366f3e26f2..a482d3eed0c6e 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudfront-origins", "module": "aws_cdk.aws_cloudfront_origins" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 3769bd26d7b74..ce572ee16d334 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudfront", "module": "aws_cdk.aws_cloudfront" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 4b0c2465dd004..20bec41b6b927 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudtrail", "module": "aws_cdk.aws_cloudtrail" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index b0fda2aa4968d..fed2f5d6267d2 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudwatch-actions", "module": "aws_cdk.aws_cloudwatch_actions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cloudwatch/package.json b/packages/@aws-cdk/aws-cloudwatch/package.json index 7d9738d6f98b3..d9e6c1448589b 100644 --- a/packages/@aws-cdk/aws-cloudwatch/package.json +++ b/packages/@aws-cdk/aws-cloudwatch/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cloudwatch", "module": "aws_cdk.aws_cloudwatch" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 27b87dfb9598e..023b3ca9a8965 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codebuild", "module": "aws_cdk.aws_codebuild" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index d8a31cd1f75d6..467df3927cdf3 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codecommit", "module": "aws_cdk.aws_codecommit" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index 65599aa94455b..c7169dfb2dfc6 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codedeploy", "module": "aws_cdk.aws_codedeploy" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index a114721c9e514..010418381bdc3 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codeguruprofiler", "module": "aws_cdk.aws_codeguruprofiler" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index a7442af7b52b6..0054aaece4e88 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codepipeline-actions", "module": "aws_cdk.aws_codepipeline_actions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 0a94e85b6a724..097e42970e532 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codepipeline", "module": "aws_cdk.aws_codepipeline" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestar/package.json b/packages/@aws-cdk/aws-codestar/package.json index 2b1d9cfc7773c..3d4f36e50f0e3 100644 --- a/packages/@aws-cdk/aws-codestar/package.json +++ b/packages/@aws-cdk/aws-codestar/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codestar", "module": "aws_cdk.aws_codestar" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestarconnections/package.json b/packages/@aws-cdk/aws-codestarconnections/package.json index f00755a028d27..979b46551f051 100644 --- a/packages/@aws-cdk/aws-codestarconnections/package.json +++ b/packages/@aws-cdk/aws-codestarconnections/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codestarconnections", "module": "aws_cdk.aws_codestarconnections" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-codestarnotifications/package.json b/packages/@aws-cdk/aws-codestarnotifications/package.json index fc2af8c156c95..4792ef56f6067 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/package.json +++ b/packages/@aws-cdk/aws-codestarnotifications/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-codestarnotifications", "module": "aws_cdk.aws_codestarnotifications" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 5a72c3d09f551..b88d41e091c0f 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-cognito", "module": "aws_cdk.aws_cognito" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-config/package.json b/packages/@aws-cdk/aws-config/package.json index 7f12b80773cb3..91269fbc4a527 100644 --- a/packages/@aws-cdk/aws-config/package.json +++ b/packages/@aws-cdk/aws-config/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-config", "module": "aws_cdk.aws_config" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-datapipeline/package.json b/packages/@aws-cdk/aws-datapipeline/package.json index 0c3c5712c7919..01a010281dc65 100644 --- a/packages/@aws-cdk/aws-datapipeline/package.json +++ b/packages/@aws-cdk/aws-datapipeline/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-datapipeline", "module": "aws_cdk.aws_datapipeline" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dax/package.json b/packages/@aws-cdk/aws-dax/package.json index 7fe462acd30c6..26af5a481d81b 100644 --- a/packages/@aws-cdk/aws-dax/package.json +++ b/packages/@aws-cdk/aws-dax/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-dax", "module": "aws_cdk.aws_dax" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-detective/package.json b/packages/@aws-cdk/aws-detective/package.json index e8a168b25ca28..6becc0bc0a150 100644 --- a/packages/@aws-cdk/aws-detective/package.json +++ b/packages/@aws-cdk/aws-detective/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-detective", "module": "aws_cdk.aws_detective" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-directoryservice/package.json b/packages/@aws-cdk/aws-directoryservice/package.json index 462f8cdfcdf8d..08c4f22f761dc 100644 --- a/packages/@aws-cdk/aws-directoryservice/package.json +++ b/packages/@aws-cdk/aws-directoryservice/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-directoryservice", "module": "aws_cdk.aws_directoryservice" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dlm/package.json b/packages/@aws-cdk/aws-dlm/package.json index 52e12eb311682..b059dfd3d897c 100644 --- a/packages/@aws-cdk/aws-dlm/package.json +++ b/packages/@aws-cdk/aws-dlm/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-dlm", "module": "aws_cdk.aws_dlm" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dms/package.json b/packages/@aws-cdk/aws-dms/package.json index 901a5631b8aba..033e6d9934c7d 100644 --- a/packages/@aws-cdk/aws-dms/package.json +++ b/packages/@aws-cdk/aws-dms/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-dms", "module": "aws_cdk.aws_dms" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index 3fa00723a3c94..b5b826f599b88 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-docdb", "module": "aws_cdk.aws_docdb" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index e214cbbbb210c..b0b47ebdb729b 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -36,7 +36,8 @@ "assemblyOriginatorKeyFile": "../../key.snk", "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png" } - } + }, + "projectReferences": true }, "keywords": [ "aws", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index bc161f2565d58..51fcea65ce3b2 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-dynamodb", "module": "aws_cdk.aws_dynamodb" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index 209b34723806e..e4f2ea1193925 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ec2", "module": "aws_cdk.aws_ec2" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index b8bf88738da1d..6fef7294c4df6 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ecr-assets", "module": "aws_cdk.aws_ecr_assets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index fafe098831c9b..d4596117546b8 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ecr", "module": "aws_cdk.aws_ecr" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index 16bcc51f7e25e..4cf84f3fa0910 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ecs-patterns", "module": "aws_cdk.aws_ecs_patterns" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index 3e36f73bb6266..71e52d5e81aa3 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ecs", "module": "aws_cdk.aws_ecs" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-efs/package.json b/packages/@aws-cdk/aws-efs/package.json index 3b7a5db1e0b78..0115cdbd4baee 100644 --- a/packages/@aws-cdk/aws-efs/package.json +++ b/packages/@aws-cdk/aws-efs/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-efs", "module": "aws_cdk.aws_efs" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-eks-legacy/package.json b/packages/@aws-cdk/aws-eks-legacy/package.json index b00924740d28b..573a1d300aa95 100644 --- a/packages/@aws-cdk/aws-eks-legacy/package.json +++ b/packages/@aws-cdk/aws-eks-legacy/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-eks-legacy", "module": "aws_cdk.aws_eks_legacy" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 24426f0acb0d1..0fdb3a1d5d055 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-eks", "module": "aws_cdk.aws_eks" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticache/package.json b/packages/@aws-cdk/aws-elasticache/package.json index 5c6963be97cb9..a455695ce4b75 100644 --- a/packages/@aws-cdk/aws-elasticache/package.json +++ b/packages/@aws-cdk/aws-elasticache/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticache", "module": "aws_cdk.aws_elasticache" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/package.json b/packages/@aws-cdk/aws-elasticbeanstalk/package.json index e7845ae99891f..911666bd2962f 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/package.json +++ b/packages/@aws-cdk/aws-elasticbeanstalk/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticbeanstalk", "module": "aws_cdk.aws_elasticbeanstalk" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index 3d2cf1442fd42..88c3a07eb4e43 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticloadbalancing", "module": "aws_cdk.aws_elasticloadbalancing" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index ba866cf3a4dee..bda8eaf808744 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticloadbalancingv2-actions", "module": "aws_cdk.aws_elasticloadbalancingv2_actions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index fdef0856ac238..0e5deb8b54d99 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticloadbalancingv2-targets", "module": "aws_cdk.aws_elasticloadbalancingv2_targets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 0f9a33289b9d8..4afea909c5575 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticloadbalancingv2", "module": "aws_cdk.aws_elasticloadbalancingv2" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-elasticsearch/package.json b/packages/@aws-cdk/aws-elasticsearch/package.json index 3b4da6e728f14..08d0f7bc07955 100644 --- a/packages/@aws-cdk/aws-elasticsearch/package.json +++ b/packages/@aws-cdk/aws-elasticsearch/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-elasticsearch", "module": "aws_cdk.aws_elasticsearch" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-emr/package.json b/packages/@aws-cdk/aws-emr/package.json index b40e51a1a0fdf..f1bd38b3cdfe0 100644 --- a/packages/@aws-cdk/aws-emr/package.json +++ b/packages/@aws-cdk/aws-emr/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-emr", "module": "aws_cdk.aws_emr" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 0af32c97f9c98..39bd37cff9bdd 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-events-targets", "module": "aws_cdk.aws_events_targets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index 112095403d69d..d9dda9e4dc98c 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-events", "module": "aws_cdk.aws_events" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-eventschemas/package.json b/packages/@aws-cdk/aws-eventschemas/package.json index 0df440c7cdffb..046e548e0475b 100644 --- a/packages/@aws-cdk/aws-eventschemas/package.json +++ b/packages/@aws-cdk/aws-eventschemas/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-eventschemas", "module": "aws_cdk.aws_eventschemas" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-fms/package.json b/packages/@aws-cdk/aws-fms/package.json index cf8fbf92b10e4..8e4503807200a 100644 --- a/packages/@aws-cdk/aws-fms/package.json +++ b/packages/@aws-cdk/aws-fms/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-fms", "module": "aws_cdk.aws_fms" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-fsx/package.json b/packages/@aws-cdk/aws-fsx/package.json index 9c7be9e74b414..dc173c9be4b82 100644 --- a/packages/@aws-cdk/aws-fsx/package.json +++ b/packages/@aws-cdk/aws-fsx/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-fsx", "module": "aws_cdk.aws_fsx" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index 8151b203c8a9c..39bddd7eeb62e 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-gamelift", "module": "aws_cdk.aws_gamelift" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-globalaccelerator/package.json b/packages/@aws-cdk/aws-globalaccelerator/package.json index d9fa05dcacc62..49db0a72b68de 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-globalaccelerator", "module": "aws_cdk.aws_globalaccelerator" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index 0227fcaab0492..e16e845d7073b 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-glue", "module": "aws_cdk.aws_glue" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-greengrass/package.json b/packages/@aws-cdk/aws-greengrass/package.json index 8c56995fb2838..9cd823f6a433f 100644 --- a/packages/@aws-cdk/aws-greengrass/package.json +++ b/packages/@aws-cdk/aws-greengrass/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-greengrass", "module": "aws_cdk.aws_greengrass" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-guardduty/package.json b/packages/@aws-cdk/aws-guardduty/package.json index ecbd147877c71..25568e60614ac 100644 --- a/packages/@aws-cdk/aws-guardduty/package.json +++ b/packages/@aws-cdk/aws-guardduty/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-guardduty", "module": "aws_cdk.aws_guardduty" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 0f37067cedab6..e9488d8112ef5 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iam", "module": "aws_cdk.aws_iam" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-imagebuilder/package.json b/packages/@aws-cdk/aws-imagebuilder/package.json index 4137199aeba1f..bdf5876a166eb 100644 --- a/packages/@aws-cdk/aws-imagebuilder/package.json +++ b/packages/@aws-cdk/aws-imagebuilder/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-imagebuilder", "module": "aws_cdk.aws_imagebuilder" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-inspector/package.json b/packages/@aws-cdk/aws-inspector/package.json index 8932c2609ee1a..c673749ed6682 100644 --- a/packages/@aws-cdk/aws-inspector/package.json +++ b/packages/@aws-cdk/aws-inspector/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-inspector", "module": "aws_cdk.aws_inspector" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iot/package.json b/packages/@aws-cdk/aws-iot/package.json index 129bc07cc9612..88320ac412fbc 100644 --- a/packages/@aws-cdk/aws-iot/package.json +++ b/packages/@aws-cdk/aws-iot/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iot", "module": "aws_cdk.aws_iot" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iot1click/package.json b/packages/@aws-cdk/aws-iot1click/package.json index 9ffd414d1ce54..bef812a929ec1 100644 --- a/packages/@aws-cdk/aws-iot1click/package.json +++ b/packages/@aws-cdk/aws-iot1click/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iot1click", "module": "aws_cdk.aws_iot1click" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotanalytics/package.json b/packages/@aws-cdk/aws-iotanalytics/package.json index cb3f04b6d7327..d26ee62ea7ec0 100644 --- a/packages/@aws-cdk/aws-iotanalytics/package.json +++ b/packages/@aws-cdk/aws-iotanalytics/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iotanalytics", "module": "aws_cdk.aws_iotanalytics" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index 3fcd793108886..5b2892558f3d2 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iotevents", "module": "aws_cdk.aws_iotevents" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-iotthingsgraph/package.json b/packages/@aws-cdk/aws-iotthingsgraph/package.json index 57342d591fd11..374eac0d129f7 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/package.json +++ b/packages/@aws-cdk/aws-iotthingsgraph/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-iotthingsgraph", "module": "aws_cdk.aws_iotthingsgraph" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-kinesis/package.json b/packages/@aws-cdk/aws-kinesis/package.json index 2e8866d2170d5..acd9f40d7da9d 100644 --- a/packages/@aws-cdk/aws-kinesis/package.json +++ b/packages/@aws-cdk/aws-kinesis/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-kinesis", "module": "aws_cdk.aws_kinesis" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-kinesisanalytics/package.json b/packages/@aws-cdk/aws-kinesisanalytics/package.json index 65237840ff87d..40c0a6f75ba32 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-kinesisanalytics", "module": "aws_cdk.aws_kinesisanalytics" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-kinesisfirehose/package.json b/packages/@aws-cdk/aws-kinesisfirehose/package.json index e468ddac10d1d..f5ed91901be94 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-kinesisfirehose", "module": "aws_cdk.aws_kinesisfirehose" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index 2251944ffcb68..22f87123c0c6b 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-kms", "module": "aws_cdk.aws_kms" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lakeformation/package.json b/packages/@aws-cdk/aws-lakeformation/package.json index e64123f8085c2..82204d36c6238 100644 --- a/packages/@aws-cdk/aws-lakeformation/package.json +++ b/packages/@aws-cdk/aws-lakeformation/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lakeformation", "module": "aws_cdk.aws_lakeformation" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index d02ddde7aa635..83e0707cfe54e 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lambda-destinations", "module": "aws_cdk.aws_lambda_destinations" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index e381573d61ca6..853b6ef9ebfd8 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lambda-event-sources", "module": "aws_cdk.aws_lambda_event_sources" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index e4a11c6a816f0..e0722665bb319 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lambda-nodejs", "module": "aws_cdk.aws_lambda_nodejs" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lambda-python/package.json b/packages/@aws-cdk/aws-lambda-python/package.json index ca24866ea79b1..ccf141dfe1a08 100644 --- a/packages/@aws-cdk/aws-lambda-python/package.json +++ b/packages/@aws-cdk/aws-lambda-python/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lambda-python", "module": "aws_cdk.aws_lambda_python" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index b7fe98f9a2f8e..234a23cf9f011 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-lambda", "module": "aws_cdk.aws_lambda" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index bfa6f4a73f371..c8f2488210f62 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-logs-destinations", "module": "aws_cdk.aws_logs_destinations" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index c7dc3e58d9753..bed661f52e891 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-logs", "module": "aws_cdk.aws_logs" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-macie/package.json b/packages/@aws-cdk/aws-macie/package.json index ec9bf60d76782..0aa5b62ab052e 100644 --- a/packages/@aws-cdk/aws-macie/package.json +++ b/packages/@aws-cdk/aws-macie/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-macie", "module": "aws_cdk.aws_macie" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-managedblockchain/package.json b/packages/@aws-cdk/aws-managedblockchain/package.json index 115fdeb107cdc..695a7a7265a2e 100644 --- a/packages/@aws-cdk/aws-managedblockchain/package.json +++ b/packages/@aws-cdk/aws-managedblockchain/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-managedblockchain", "module": "aws_cdk.aws_managedblockchain" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-mediaconvert/package.json b/packages/@aws-cdk/aws-mediaconvert/package.json index a9715d82568fe..6ad521b2eec8e 100644 --- a/packages/@aws-cdk/aws-mediaconvert/package.json +++ b/packages/@aws-cdk/aws-mediaconvert/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-mediaconvert", "module": "aws_cdk.aws_mediaconvert" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-medialive/package.json b/packages/@aws-cdk/aws-medialive/package.json index 6c3d6071601ee..20f44637e68b0 100644 --- a/packages/@aws-cdk/aws-medialive/package.json +++ b/packages/@aws-cdk/aws-medialive/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-medialive", "module": "aws_cdk.aws_medialive" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-mediastore/package.json b/packages/@aws-cdk/aws-mediastore/package.json index 9dddf5241e70d..21ebd0bab5142 100644 --- a/packages/@aws-cdk/aws-mediastore/package.json +++ b/packages/@aws-cdk/aws-mediastore/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-mediastore", "module": "aws_cdk.aws_mediastore" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index c2b6273e03135..337cb5a1d68fb 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-msk", "module": "aws_cdk.aws_msk" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-neptune/package.json b/packages/@aws-cdk/aws-neptune/package.json index 93a966b1e782c..a26c121ac7188 100644 --- a/packages/@aws-cdk/aws-neptune/package.json +++ b/packages/@aws-cdk/aws-neptune/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-neptune", "module": "aws_cdk.aws_neptune" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-networkmanager/package.json b/packages/@aws-cdk/aws-networkmanager/package.json index 7b1f0cd75be8e..26074e1ccd28a 100644 --- a/packages/@aws-cdk/aws-networkmanager/package.json +++ b/packages/@aws-cdk/aws-networkmanager/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-networkmanager", "module": "aws_cdk.aws_networkmanager" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-opsworks/package.json b/packages/@aws-cdk/aws-opsworks/package.json index 020fe11906219..2d94bde5f00c7 100644 --- a/packages/@aws-cdk/aws-opsworks/package.json +++ b/packages/@aws-cdk/aws-opsworks/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-opsworks", "module": "aws_cdk.aws_opsworks" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-opsworkscm/package.json b/packages/@aws-cdk/aws-opsworkscm/package.json index 659eb8a9745c2..692ee7779a53c 100644 --- a/packages/@aws-cdk/aws-opsworkscm/package.json +++ b/packages/@aws-cdk/aws-opsworkscm/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-opsworkscm", "module": "aws_cdk.aws_opsworkscm" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-pinpoint/package.json b/packages/@aws-cdk/aws-pinpoint/package.json index 1ada031b4b640..8761fd6f2e89d 100644 --- a/packages/@aws-cdk/aws-pinpoint/package.json +++ b/packages/@aws-cdk/aws-pinpoint/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-pinpoint", "module": "aws_cdk.aws_pinpoint" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-pinpointemail/package.json b/packages/@aws-cdk/aws-pinpointemail/package.json index fbe2e8417bee9..4a1c6e6dd1ae7 100644 --- a/packages/@aws-cdk/aws-pinpointemail/package.json +++ b/packages/@aws-cdk/aws-pinpointemail/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-pinpointemail", "module": "aws_cdk.aws_pinpointemail" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-qldb/package.json b/packages/@aws-cdk/aws-qldb/package.json index 5db773c1a026a..250d1751c64e2 100644 --- a/packages/@aws-cdk/aws-qldb/package.json +++ b/packages/@aws-cdk/aws-qldb/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-qldb", "module": "aws_cdk.aws_qldb" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ram/package.json b/packages/@aws-cdk/aws-ram/package.json index 2799e1917e02e..7437999790086 100644 --- a/packages/@aws-cdk/aws-ram/package.json +++ b/packages/@aws-cdk/aws-ram/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ram", "module": "aws_cdk.aws_ram" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index df41aac87053b..fc563305585b4 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-rds", "module": "aws_cdk.aws_rds" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index 3b645e15ba91e..b1794c1fb9137 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-redshift", "module": "aws_cdk.aws_redshift" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-resourcegroups/package.json b/packages/@aws-cdk/aws-resourcegroups/package.json index b8f66b73856c6..8c02fb8346b04 100644 --- a/packages/@aws-cdk/aws-resourcegroups/package.json +++ b/packages/@aws-cdk/aws-resourcegroups/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-resourcegroups", "module": "aws_cdk.aws_resourcegroups" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-robomaker/package.json b/packages/@aws-cdk/aws-robomaker/package.json index e74ee3bf2ebdf..e127fc4add0f3 100644 --- a/packages/@aws-cdk/aws-robomaker/package.json +++ b/packages/@aws-cdk/aws-robomaker/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-robomaker", "module": "aws_cdk.aws_robomaker" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index 040ec243a21a8..d2ec5df50127f 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-route53-patterns", "module": "aws_cdk.aws_route53_patterns" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index f7ab4f96b29b9..cb79a9a4a4fa3 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-route53-targets", "module": "aws_cdk.aws_route53_targets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index ddeac8eead8a9..45e3a261ccdc2 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-route53", "module": "aws_cdk.aws_route53" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-route53resolver/package.json b/packages/@aws-cdk/aws-route53resolver/package.json index 55a0373fa39bb..9e2e4ae3d9185 100644 --- a/packages/@aws-cdk/aws-route53resolver/package.json +++ b/packages/@aws-cdk/aws-route53resolver/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-route53resolver", "module": "aws_cdk.aws_route53resolver" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-s3-assets/package.json b/packages/@aws-cdk/aws-s3-assets/package.json index 21b237022c32e..72a07d038b1b6 100644 --- a/packages/@aws-cdk/aws-s3-assets/package.json +++ b/packages/@aws-cdk/aws-s3-assets/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-s3-assets", "module": "aws_cdk.aws_s3_assets" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index ed03166cd38c5..5a449acdef2a7 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-s3-deployment", "module": "aws_cdk.aws_s3_deployment" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index 10fcc8be6b5cd..9d4381ade5e86 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-s3-notifications", "module": "aws_cdk.aws_s3_notifications" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index a28a0631c9621..d6ba2a1de0f55 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-s3", "module": "aws_cdk.aws_s3" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sagemaker/package.json b/packages/@aws-cdk/aws-sagemaker/package.json index 712de070d4176..31cfbf23b011f 100644 --- a/packages/@aws-cdk/aws-sagemaker/package.json +++ b/packages/@aws-cdk/aws-sagemaker/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-sagemaker", "module": "aws_cdk.aws_sagemaker" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 936f21d34f920..2ae4f4a194622 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-sam", "module": "aws_cdk.aws_sam" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sdb/package.json b/packages/@aws-cdk/aws-sdb/package.json index 298a065145bf1..0449b073cb18b 100644 --- a/packages/@aws-cdk/aws-sdb/package.json +++ b/packages/@aws-cdk/aws-sdb/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-sdb", "module": "aws_cdk.aws_sdb" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index ca00bf77825cb..e606e8bd1623f 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-secretsmanager", "module": "aws_cdk.aws_secretsmanager" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-securityhub/package.json b/packages/@aws-cdk/aws-securityhub/package.json index f9fc70cdd1aa2..dd69a0c87f8ce 100644 --- a/packages/@aws-cdk/aws-securityhub/package.json +++ b/packages/@aws-cdk/aws-securityhub/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-securityhub", "module": "aws_cdk.aws_securityhub" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-servicecatalog/package.json b/packages/@aws-cdk/aws-servicecatalog/package.json index 83618ad430988..b4206f0798b8e 100644 --- a/packages/@aws-cdk/aws-servicecatalog/package.json +++ b/packages/@aws-cdk/aws-servicecatalog/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-servicecatalog", "module": "aws_cdk.aws_servicecatalog" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index 78c05ec3aeac1..e03bf2bba09a8 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-servicediscovery", "module": "aws_cdk.aws_servicediscovery" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index 98ceb9b2cd0b6..fb881ce99d964 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ses-actions", "module": "aws_cdk.aws_ses_actions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index 69a866c63e23f..55d89a9f30ee4 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ses", "module": "aws_cdk.aws_ses" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 13535b66faf0a..628185af18f75 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-sns-subscriptions", "module": "aws_cdk.aws_sns_subscriptions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sns/package.json b/packages/@aws-cdk/aws-sns/package.json index edb4014d52f52..d862d55d890a5 100644 --- a/packages/@aws-cdk/aws-sns/package.json +++ b/packages/@aws-cdk/aws-sns/package.json @@ -28,7 +28,8 @@ }, "excludeTypescript": [ "examples" - ] + ], + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 6bc233d96bc6a..15d3dd810d62b 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-sqs", "module": "aws_cdk.aws_sqs" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-ssm/package.json b/packages/@aws-cdk/aws-ssm/package.json index 2758e7b15bd10..d890f3c7e2734 100644 --- a/packages/@aws-cdk/aws-ssm/package.json +++ b/packages/@aws-cdk/aws-ssm/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-ssm", "module": "aws_cdk.aws_ssm" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 822215fd74708..821efcfb58ca7 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-stepfunctions-tasks", "module": "aws_cdk.aws_stepfunctions_tasks" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-stepfunctions/package.json b/packages/@aws-cdk/aws-stepfunctions/package.json index ca5cb32a388c7..00efa57ce85b8 100644 --- a/packages/@aws-cdk/aws-stepfunctions/package.json +++ b/packages/@aws-cdk/aws-stepfunctions/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-stepfunctions", "module": "aws_cdk.aws_stepfunctions" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-synthetics/package.json b/packages/@aws-cdk/aws-synthetics/package.json index 020a3038d3f81..985c8b2178804 100644 --- a/packages/@aws-cdk/aws-synthetics/package.json +++ b/packages/@aws-cdk/aws-synthetics/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-synthetics", "module": "aws_cdk.aws_synthetics" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-transfer/package.json b/packages/@aws-cdk/aws-transfer/package.json index e791a0ebd8e77..5bb2c4728dbdf 100644 --- a/packages/@aws-cdk/aws-transfer/package.json +++ b/packages/@aws-cdk/aws-transfer/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-transfer", "module": "aws_cdk.aws_transfer" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-waf/package.json b/packages/@aws-cdk/aws-waf/package.json index 2489e5da4104b..845089dd52ab9 100644 --- a/packages/@aws-cdk/aws-waf/package.json +++ b/packages/@aws-cdk/aws-waf/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-waf", "module": "aws_cdk.aws_waf" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-wafregional/package.json b/packages/@aws-cdk/aws-wafregional/package.json index 0487d24933b0e..e0b494237dbaf 100644 --- a/packages/@aws-cdk/aws-wafregional/package.json +++ b/packages/@aws-cdk/aws-wafregional/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-wafregional", "module": "aws_cdk.aws_wafregional" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-wafv2/package.json b/packages/@aws-cdk/aws-wafv2/package.json index 751545a948b45..536432bcb5a7d 100644 --- a/packages/@aws-cdk/aws-wafv2/package.json +++ b/packages/@aws-cdk/aws-wafv2/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-wafv2", "module": "aws_cdk.aws_wafv2" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/aws-workspaces/package.json b/packages/@aws-cdk/aws-workspaces/package.json index c031eddc57e37..e6672fbeb19b0 100644 --- a/packages/@aws-cdk/aws-workspaces/package.json +++ b/packages/@aws-cdk/aws-workspaces/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.aws-workspaces", "module": "aws_cdk.aws_workspaces" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 4659569db0eec..4a3f52d24155f 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.cdk-assets-schema", "module": "aws_cdk.cdk_assets_schema" } - } + }, + "projectReferences": true }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts index 2454f92b35e91..a4fe90f098011 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/create-missing-libraries.ts @@ -107,6 +107,7 @@ async function main() { types: 'lib/index.d.ts', jsii: { outdir: 'dist', + projectReferences: true, targets: { dotnet: { namespace: dotnetPackage, diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 4fd383e55aba2..3e877257e9390 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.cloud-assembly-schema", "module": "aws_cdk.cloud_assembly_schema" } - } + }, + "projectReferences": true }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 6bc822e8c5c97..7261179f66045 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.cloudformation-include", "module": "aws_cdk.cloudformation_include" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 761852c7ccb6c..365c835f0af19 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.core", "module": "aws_cdk.core" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index a775f94395b25..dc6fa0e9c7cf4 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.custom-resources", "module": "aws_cdk.custom_resources" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 639ae2508e2ed..836395f175f5a 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.cx-api", "module": "aws_cdk.cx_api" } - } + }, + "projectReferences": true }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 49046856a2fbe..230cc5c4cee78 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -26,7 +26,8 @@ "distName": "aws-cdk.example-construct-library", "module": "aws_cdk.example_construct_library" } - } + }, + "projectReferences": true }, "repository": { "type": "git", diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index 9101924d441c6..80c690264917d 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -105,7 +105,8 @@ "distName": "aws-cdk.pipelines", "module": "aws_cdk.pipelines" } - } + }, + "projectReferences": true }, "awscdkio": { "announce": false diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index b15f9c8e7f3f7..260082f9c02a8 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -25,7 +25,8 @@ "distName": "aws-cdk.region-info", "module": "aws_cdk.region_info" } - } + }, + "projectReferences": true }, "cdk-build": { "pre": [ diff --git a/packages/@monocdk-experiment/assert/tsconfig.json b/packages/@monocdk-experiment/assert/tsconfig.json index db0564499ef48..b426f95fcb96a 100644 --- a/packages/@monocdk-experiment/assert/tsconfig.json +++ b/packages/@monocdk-experiment/assert/tsconfig.json @@ -21,5 +21,8 @@ "incremental": true }, "include": ["**/*.ts" ], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "references": [ + { "path": "../../@aws-cdk/cloudformation-diff" } + ] } diff --git a/packages/monocdk-experiment/package.json b/packages/monocdk-experiment/package.json index 29b1cdcff541a..4d54f6d2e1f28 100644 --- a/packages/monocdk-experiment/package.json +++ b/packages/monocdk-experiment/package.json @@ -70,7 +70,8 @@ "distName": "monocdk.experiment", "module": "monocdk_experiment" } - } + }, + "projectReferences": false }, "author": { "name": "Amazon Web Services", diff --git a/tools/cdk-build-tools/bin/cdk-watch.ts b/tools/cdk-build-tools/bin/cdk-watch.ts index ef3c26e73d5eb..febefb4100671 100644 --- a/tools/cdk-build-tools/bin/cdk-watch.ts +++ b/tools/cdk-build-tools/bin/cdk-watch.ts @@ -23,7 +23,7 @@ async function main() { }) .argv as any; - await shell(packageCompiler({ jsii: args.jsii, tsc: args.tsc }).concat(['-w'])); + await shell(packageCompiler({ jsii: args.jsii, tsc: args.tsc }).concat(['-w'])); } main().catch(e => { diff --git a/tools/cdk-build-tools/lib/package-info.ts b/tools/cdk-build-tools/lib/package-info.ts index c20efb61a5cde..afc4041776b9f 100644 --- a/tools/cdk-build-tools/lib/package-info.ts +++ b/tools/cdk-build-tools/lib/package-info.ts @@ -83,7 +83,7 @@ export interface CompilerOverrides { */ export function packageCompiler(compilers: CompilerOverrides): string[] { if (isJsii()) { - return [compilers.jsii || require.resolve('jsii/bin/jsii'), '--project-references', '--silence-warnings=reserved-word']; + return [compilers.jsii || require.resolve('jsii/bin/jsii'), '--silence-warnings=reserved-word']; } else { return [compilers.tsc || require.resolve('typescript/bin/tsc'), '--build']; } diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 7c018b57e42d1..bc85cd383c86a 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -467,6 +467,26 @@ export class CDKKeywords extends ValidationRule { } } +/** + * Requires projectReferences to be set in the jsii configuration. + */ +export class JSIIProjectReferences extends ValidationRule { + public readonly name = 'jsii/project-references'; + + public validate(pkg: PackageJson): void { + if (!isJSII(pkg)) { + return; + } + + expectJSON( + this.name, + pkg, + 'jsii.projectReferences', + pkg.json.name !== 'monocdk-experiment', + ); + } +} + /** * JSII Java package is required and must look sane */ From fa7f77ef94e10d3b1d1af06bbe4d6113c604d5f1 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 25 Aug 2020 13:15:10 +0200 Subject: [PATCH 30/42] chore: check format of 'BREAKING CHANGE:' notice (#9928) I myself keep on forgetting whether it's spelled 'BREAKING CHANGE:' or 'BREAKING CHANGES:', and maybe whether or not to put a `(topic)` there, that I prefer a machine checks this for me. --- .github/actions/prlinter/action.yml | 6 +----- .github/actions/prlinter/index.js | 14 +------------- .github/workflows/pr-linter.yml | 5 +---- tools/prlint/index.js | 24 +++++++++++++++++++++--- 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/actions/prlinter/action.yml b/.github/actions/prlinter/action.yml index 4d6a52c193ced..b81861792594f 100644 --- a/.github/actions/prlinter/action.yml +++ b/.github/actions/prlinter/action.yml @@ -1,9 +1,5 @@ name: Pull Request Linter description: Execute validation rules on GitHub Pull Requests -inputs: - check: - description: "Which check to execute. Choose one of: [MANDATORY_CHANGES]" - required: true runs: using: node12 - main: index.js \ No newline at end of file + main: index.js diff --git a/.github/actions/prlinter/index.js b/.github/actions/prlinter/index.js index e36cc7aa9ffba..12e213bb0ebd4 100644 --- a/.github/actions/prlinter/index.js +++ b/.github/actions/prlinter/index.js @@ -2,25 +2,13 @@ const core = require('@actions/core'); const github = require('@actions/github'); const linter = require('prlint') -const checks = { - "MANDATORY_CHANGES": linter.mandatoryChanges -} - async function run() { const number = github.context.issue.number; try { - const checkType = core.getInput('check', {required: true}); - - const check = checks[checkType]; - - if (!check) { - throw new Error(`Unsupported check type '${checkType}'. Choose one of: ${Object.keys(checks)}`) - } + await linter.validatePr(number); - await check(number); - } catch (error) { core.setFailed(error.message); diff --git a/.github/workflows/pr-linter.yml b/.github/workflows/pr-linter.yml index fa76388ac6802..bb8c6dd66943b 100644 --- a/.github/workflows/pr-linter.yml +++ b/.github/workflows/pr-linter.yml @@ -5,7 +5,7 @@ name: PR Linter on: pull_request jobs: - mandatory-changes: + validate-pr: runs-on: ubuntu-latest steps: @@ -17,8 +17,5 @@ jobs: - name: Validate uses: ./.github/actions/prlinter - with: - check: MANDATORY_CHANGES env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - diff --git a/tools/prlint/index.js b/tools/prlint/index.js index 6d9a1c3c42779..addb026ec6924 100755 --- a/tools/prlint/index.js +++ b/tools/prlint/index.js @@ -76,7 +76,24 @@ function hasLabel(issue, labelName) { }) } -async function mandatoryChanges(number) { +/** + * Check that the 'BREAKING CHANGE:' note in the body is correct. + * + * Check this by looking for something that most likely was intended + * to be said note, but got misspelled as "BREAKING CHANGES:" or + * "BREAKING CHANGES(module):" + */ +function validateBreakingChangeFormat(body) { + const re = /^BREAKING.*$/m; + const m = re.exec(body); + if (m) { + if (!m[0].startsWith('BREAKING CHANGE: ')) { + throw new LinterError(`Breaking changes should be indicated by starting a line with 'BREAKING CHANGE: ', variations are not allowed. (found: '${m[0]}')`); + } + } +} + +async function validatePr(number) { if (!number) { throw new Error('Must provide a PR number') @@ -108,6 +125,8 @@ async function mandatoryChanges(number) { fixContainsTest(issue, files); } + validateBreakingChangeFormat(issue.body); + console.log("✅ Success") } @@ -115,8 +134,7 @@ async function mandatoryChanges(number) { // we don't use the 'export' prefix because github actions // node runtime doesn't seem to support ES6. // TODO need to verify this. -module.exports.mandatoryChanges = mandatoryChanges -module.exports.LinterError = LinterError +module.exports.validatePr = validatePr require('make-runnable/custom')({ printOutputFrame: false From 3c116f3b5854726bef610e425fc35f2d2b50a179 Mon Sep 17 00:00:00 2001 From: Romain Marcadier Date: Tue, 25 Aug 2020 16:25:11 +0200 Subject: [PATCH 31/42] chore: upgrade all dependencies (#9963) Make sure all dependencies are on the latest, in particular ensure all instances of `dot-prop` are versions that are patched against CVE-2020-8116 (i.e. >= 5.2.0 or >= 4.2.1). --- package.json | 14 +- packages/@aws-cdk/alexa-ask/package.json | 4 +- packages/@aws-cdk/app-delivery/package.json | 4 +- packages/@aws-cdk/assert/package.json | 14 +- packages/@aws-cdk/assets/package.json | 8 +- .../@aws-cdk/aws-accessanalyzer/package.json | 4 +- packages/@aws-cdk/aws-acmpca/package.json | 4 +- packages/@aws-cdk/aws-amazonmq/package.json | 4 +- packages/@aws-cdk/aws-amplify/package.json | 4 +- packages/@aws-cdk/aws-apigateway/package.json | 4 +- .../@aws-cdk/aws-apigatewayv2/package.json | 4 +- packages/@aws-cdk/aws-appconfig/package.json | 4 +- .../aws-applicationautoscaling/package.json | 4 +- packages/@aws-cdk/aws-appmesh/package.json | 4 +- packages/@aws-cdk/aws-appstream/package.json | 4 +- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 2 +- .../aws-appsync/lib/mapping-template.ts | 2 +- packages/@aws-cdk/aws-appsync/package.json | 4 +- packages/@aws-cdk/aws-athena/package.json | 4 +- .../aws-autoscaling-common/package.json | 4 +- .../aws-autoscaling-hooktargets/package.json | 4 +- .../@aws-cdk/aws-autoscaling/package.json | 4 +- .../aws-autoscalingplans/package.json | 4 +- packages/@aws-cdk/aws-backup/package.json | 4 +- packages/@aws-cdk/aws-batch/package.json | 4 +- packages/@aws-cdk/aws-budgets/package.json | 4 +- .../aws-certificatemanager/package.json | 4 +- packages/@aws-cdk/aws-cloud9/package.json | 4 +- .../@aws-cdk/aws-cloudformation/package.json | 6 +- .../aws-cloudfront-origins/package.json | 6 +- packages/@aws-cdk/aws-cloudfront/package.json | 6 +- packages/@aws-cdk/aws-cloudtrail/package.json | 6 +- .../aws-cloudwatch-actions/package.json | 4 +- packages/@aws-cdk/aws-cloudwatch/package.json | 4 +- packages/@aws-cdk/aws-codebuild/package.json | 6 +- packages/@aws-cdk/aws-codecommit/package.json | 6 +- packages/@aws-cdk/aws-codedeploy/package.json | 4 +- .../aws-codeguruprofiler/package.json | 2 +- .../aws-codepipeline-actions/package.json | 6 +- .../@aws-cdk/aws-codepipeline/package.json | 4 +- packages/@aws-cdk/aws-codestar/package.json | 4 +- .../aws-codestarnotifications/package.json | 4 +- packages/@aws-cdk/aws-cognito/package.json | 4 +- packages/@aws-cdk/aws-config/package.json | 4 +- .../@aws-cdk/aws-datapipeline/package.json | 4 +- packages/@aws-cdk/aws-dax/package.json | 4 +- .../aws-directoryservice/package.json | 4 +- packages/@aws-cdk/aws-dlm/package.json | 4 +- packages/@aws-cdk/aws-dms/package.json | 4 +- packages/@aws-cdk/aws-docdb/package.json | 4 +- .../@aws-cdk/aws-dynamodb-global/package.json | 4 +- packages/@aws-cdk/aws-dynamodb/package.json | 16 +- packages/@aws-cdk/aws-ec2/package.json | 4 +- packages/@aws-cdk/aws-ecr-assets/package.json | 4 +- packages/@aws-cdk/aws-ecr/package.json | 4 +- .../@aws-cdk/aws-ecs-patterns/package.json | 4 +- packages/@aws-cdk/aws-ecs/package.json | 4 +- packages/@aws-cdk/aws-efs/package.json | 4 +- packages/@aws-cdk/aws-eks-legacy/package.json | 4 +- packages/@aws-cdk/aws-eks/package.json | 8 +- .../aws-eks/rosetta/default.ts-fixture | 10 + .../@aws-cdk/aws-elasticache/package.json | 4 +- .../aws-elasticbeanstalk/package.json | 4 +- .../aws-elasticloadbalancing/package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../aws-elasticloadbalancingv2/package.json | 4 +- .../@aws-cdk/aws-elasticsearch/package.json | 4 +- packages/@aws-cdk/aws-emr/package.json | 4 +- .../@aws-cdk/aws-events-targets/package.json | 6 +- packages/@aws-cdk/aws-events/package.json | 4 +- .../@aws-cdk/aws-eventschemas/package.json | 4 +- packages/@aws-cdk/aws-fms/package.json | 4 +- packages/@aws-cdk/aws-fsx/package.json | 4 +- packages/@aws-cdk/aws-gamelift/package.json | 4 +- .../aws-globalaccelerator/package.json | 4 +- packages/@aws-cdk/aws-glue/package.json | 4 +- packages/@aws-cdk/aws-greengrass/package.json | 4 +- packages/@aws-cdk/aws-guardduty/package.json | 4 +- packages/@aws-cdk/aws-iam/package.json | 6 +- packages/@aws-cdk/aws-inspector/package.json | 4 +- packages/@aws-cdk/aws-iot/package.json | 4 +- packages/@aws-cdk/aws-iot1click/package.json | 4 +- .../@aws-cdk/aws-iotanalytics/package.json | 4 +- packages/@aws-cdk/aws-iotevents/package.json | 4 +- .../@aws-cdk/aws-iotthingsgraph/package.json | 4 +- packages/@aws-cdk/aws-kinesis/package.json | 4 +- .../aws-kinesisanalytics/package.json | 4 +- .../@aws-cdk/aws-kinesisfirehose/package.json | 4 +- packages/@aws-cdk/aws-kms/package.json | 4 +- .../@aws-cdk/aws-lakeformation/package.json | 4 +- .../aws-lambda-destinations/package.json | 4 +- .../aws-lambda-event-sources/package.json | 4 +- .../@aws-cdk/aws-lambda-nodejs/package.json | 4 +- .../aws-lambda-nodejs/test/bundling.test.ts | 4 +- .../@aws-cdk/aws-lambda-python/package.json | 4 +- packages/@aws-cdk/aws-lambda/package.json | 16 +- .../aws-logs-destinations/package.json | 4 +- packages/@aws-cdk/aws-logs/package.json | 4 +- .../aws-managedblockchain/package.json | 4 +- .../@aws-cdk/aws-mediaconvert/package.json | 4 +- packages/@aws-cdk/aws-medialive/package.json | 4 +- packages/@aws-cdk/aws-mediastore/package.json | 4 +- packages/@aws-cdk/aws-msk/package.json | 4 +- packages/@aws-cdk/aws-neptune/package.json | 4 +- packages/@aws-cdk/aws-opsworks/package.json | 4 +- packages/@aws-cdk/aws-opsworkscm/package.json | 4 +- packages/@aws-cdk/aws-pinpoint/package.json | 4 +- .../@aws-cdk/aws-pinpointemail/package.json | 4 +- packages/@aws-cdk/aws-qldb/package.json | 4 +- packages/@aws-cdk/aws-ram/package.json | 4 +- packages/@aws-cdk/aws-rds/package.json | 4 +- packages/@aws-cdk/aws-redshift/package.json | 4 +- packages/@aws-cdk/aws-robomaker/package.json | 4 +- .../aws-route53-patterns/package.json | 4 +- .../@aws-cdk/aws-route53-targets/package.json | 4 +- packages/@aws-cdk/aws-route53/package.json | 6 +- .../@aws-cdk/aws-route53resolver/package.json | 4 +- packages/@aws-cdk/aws-s3-assets/package.json | 4 +- .../@aws-cdk/aws-s3-deployment/package.json | 6 +- .../aws-s3-notifications/package.json | 4 +- packages/@aws-cdk/aws-s3/package.json | 4 +- packages/@aws-cdk/aws-sagemaker/package.json | 4 +- packages/@aws-cdk/aws-sam/package.json | 8 +- packages/@aws-cdk/aws-sdb/package.json | 4 +- .../@aws-cdk/aws-secretsmanager/package.json | 4 +- .../@aws-cdk/aws-securityhub/package.json | 4 +- .../@aws-cdk/aws-servicecatalog/package.json | 4 +- .../aws-servicediscovery/package.json | 4 +- .../@aws-cdk/aws-ses-actions/package.json | 4 +- packages/@aws-cdk/aws-ses/package.json | 4 +- .../aws-sns-subscriptions/package.json | 4 +- packages/@aws-cdk/aws-sns/package.json | 4 +- packages/@aws-cdk/aws-sqs/package.json | 6 +- packages/@aws-cdk/aws-ssm/package.json | 4 +- .../aws-stepfunctions-tasks/package.json | 4 +- .../@aws-cdk/aws-stepfunctions/package.json | 4 +- packages/@aws-cdk/aws-synthetics/package.json | 4 +- packages/@aws-cdk/aws-transfer/package.json | 4 +- packages/@aws-cdk/aws-waf/package.json | 4 +- .../@aws-cdk/aws-wafregional/package.json | 4 +- packages/@aws-cdk/aws-wafv2/package.json | 4 +- packages/@aws-cdk/aws-workspaces/package.json | 4 +- .../@aws-cdk/cdk-assets-schema/package.json | 2 +- packages/@aws-cdk/cfnspec/package.json | 4 +- .../cloud-assembly-schema/package.json | 4 +- .../@aws-cdk/cloudformation-diff/package.json | 4 +- .../cloudformation-include/package.json | 6 +- packages/@aws-cdk/core/package.json | 18 +- .../@aws-cdk/custom-resources/package.json | 16 +- packages/@aws-cdk/cx-api/package.json | 8 +- .../example-construct-library/package.json | 4 +- packages/@aws-cdk/pipelines/package.json | 4 +- packages/@aws-cdk/region-info/package.json | 2 +- .../@monocdk-experiment/assert/package.json | 14 +- .../rewrite-imports/package.json | 4 +- .../app/javascript/package.template.json | 2 +- .../app/typescript/package.template.json | 8 +- .../lib/typescript/package.template.json | 8 +- .../javascript/package.template.json | 2 +- .../typescript/package.template.json | 8 +- packages/aws-cdk/package.json | 16 +- packages/awslint/bin/awslint.ts | 2 +- packages/awslint/package.json | 10 +- packages/cdk-assets/package.json | 12 +- packages/cdk-dasm/package.json | 4 +- packages/decdk/package.json | 12 +- packages/monocdk-experiment/package.json | 4 +- tools/cdk-build-tools/package.json | 20 +- tools/cdk-integ-tools/package.json | 4 +- tools/cfn2ts/package.json | 8 +- tools/nodeunit-shim/package.json | 4 +- tools/pkglint/lib/rules.ts | 2 +- tools/pkglint/package.json | 6 +- tools/pkgtools/package.json | 4 +- tools/yarn-cling/package.json | 8 +- yarn.lock | 2252 +++++++---------- 177 files changed, 1354 insertions(+), 1784 deletions(-) create mode 100644 packages/@aws-cdk/aws-eks/rosetta/default.ts-fixture diff --git a/package.json b/package.json index 9b0a2f0772de1..dffd3026d0f12 100644 --- a/package.json +++ b/package.json @@ -14,16 +14,16 @@ "build-all": "tsc -b" }, "devDependencies": { - "conventional-changelog-cli": "^2.0.34", + "conventional-changelog-cli": "^2.1.0", "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", - "jsii-diff": "^1.9.0", - "jsii-pacmak": "^1.9.0", - "jsii-rosetta": "^1.9.0", - "jest-junit": "^11.0.1", + "jest-junit": "^11.1.0", + "jsii-diff": "^1.11.0", + "jsii-pacmak": "^1.11.0", + "jsii-rosetta": "^1.11.0", "lerna": "^3.22.1", - "standard-version": "^8.0.2", - "typescript": "~3.9.6" + "standard-version": "^9.0.0", + "typescript": "~3.9.7" }, "resolutions-comment": "should be removed or reviewed when nodeunit dependency is dropped or adjusted", "resolutions": { diff --git a/packages/@aws-cdk/alexa-ask/package.json b/packages/@aws-cdk/alexa-ask/package.json index c59b0dd73cc1b..825196baf23c2 100644 --- a/packages/@aws-cdk/alexa-ask/package.json +++ b/packages/@aws-cdk/alexa-ask/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index 00baa5b032e52..d08cca8111305 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -50,7 +50,7 @@ "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "devDependencies": { "@aws-cdk/assert": "0.0.0", @@ -88,7 +88,7 @@ "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index 4d313e9a7002b..e86bfffd47709 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -21,23 +21,23 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "cdk-build-tools": "0.0.0", - "jest": "^26.0.4", + "jest": "^26.4.2", "pkglint": "0.0.0", - "ts-jest": "^26.1.3" + "ts-jest": "^26.2.0" }, "dependencies": { + "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cloudformation-diff": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "jest": "^26.0.4", - "constructs": "^3.0.2" + "constructs": "^3.0.4", + "jest": "^26.4.2" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 1ce947d1eb9a5..99f052d188ab8 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -66,25 +66,25 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.4", + "@types/sinon": "^9.0.5", "aws-cdk": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.0.2", + "sinon": "^9.0.3", "ts-mock-imports": "^1.3.0" }, "dependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-accessanalyzer/package.json b/packages/@aws-cdk/aws-accessanalyzer/package.json index e0d0dc9d3b1db..41c87fff5bdc1 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/package.json +++ b/packages/@aws-cdk/aws-accessanalyzer/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-acmpca/package.json b/packages/@aws-cdk/aws-acmpca/package.json index a5fda9769fe62..1f6a8aacf5b35 100644 --- a/packages/@aws-cdk/aws-acmpca/package.json +++ b/packages/@aws-cdk/aws-acmpca/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-amazonmq/package.json b/packages/@aws-cdk/aws-amazonmq/package.json index 7654fec455161..b215adabe636d 100644 --- a/packages/@aws-cdk/aws-amazonmq/package.json +++ b/packages/@aws-cdk/aws-amazonmq/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-amplify/package.json b/packages/@aws-cdk/aws-amplify/package.json index 623448e0430af..6f7417f3363f8 100644 --- a/packages/@aws-cdk/aws-amplify/package.json +++ b/packages/@aws-cdk/aws-amplify/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", @@ -88,7 +88,7 @@ "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-apigateway/package.json b/packages/@aws-cdk/aws-apigateway/package.json index 805dab5974747..72534284e0d2f 100644 --- a/packages/@aws-cdk/aws-apigateway/package.json +++ b/packages/@aws-cdk/aws-apigateway/package.json @@ -83,7 +83,7 @@ "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -98,7 +98,7 @@ "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-apigatewayv2/package.json b/packages/@aws-cdk/aws-apigatewayv2/package.json index 789bf0c24a3f8..5068cb8ede434 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/package.json +++ b/packages/@aws-cdk/aws-apigatewayv2/package.json @@ -76,14 +76,14 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-appconfig/package.json b/packages/@aws-cdk/aws-appconfig/package.json index 9996390cf63a8..8eff1859225bf 100644 --- a/packages/@aws-cdk/aws-appconfig/package.json +++ b/packages/@aws-cdk/aws-appconfig/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index 1c1b9353d762d..6874af24e976a 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -84,7 +84,7 @@ "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-appmesh/package.json b/packages/@aws-cdk/aws-appmesh/package.json index 37765b7b86cc6..47b943e957a4d 100644 --- a/packages/@aws-cdk/aws-appmesh/package.json +++ b/packages/@aws-cdk/aws-appmesh/package.json @@ -81,14 +81,14 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-appstream/package.json b/packages/@aws-cdk/aws-appstream/package.json index 1a84b389466fc..fe2a533988bcb 100644 --- a/packages/@aws-cdk/aws-appstream/package.json +++ b/packages/@aws-cdk/aws-appstream/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index f5f86d0077eda..0384899f1ba18 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -594,7 +594,7 @@ export class GraphQLApi extends GraphqlApiBase { if ( this.schemaMode === SchemaDefinition.FILE && !file) { throw new Error('schemaDefinitionFile must be configured if using FILE definition mode.'); } else if ( this.schemaMode === SchemaDefinition.FILE && file ) { - definition = readFileSync(file).toString('UTF-8'); + definition = readFileSync(file).toString('utf-8'); } else if ( this.schemaMode === SchemaDefinition.CODE && !file ) { definition = ''; } else if ( this.schemaMode === SchemaDefinition.CODE && file) { diff --git a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts index d4c0011c54342..22a7c1cf65ba3 100644 --- a/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts +++ b/packages/@aws-cdk/aws-appsync/lib/mapping-template.ts @@ -16,7 +16,7 @@ export abstract class MappingTemplate { * Create a mapping template from the given file */ public static fromFile(fileName: string): MappingTemplate { - return new StringMappingTemplate(readFileSync(fileName).toString('UTF-8')); + return new StringMappingTemplate(readFileSync(fileName).toString('utf-8')); } /** diff --git a/packages/@aws-cdk/aws-appsync/package.json b/packages/@aws-cdk/aws-appsync/package.json index 3f6e83e9a742c..7c38409b37325 100644 --- a/packages/@aws-cdk/aws-appsync/package.json +++ b/packages/@aws-cdk/aws-appsync/package.json @@ -78,7 +78,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -88,7 +88,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-athena/package.json b/packages/@aws-cdk/aws-athena/package.json index 04373eb81fd52..7f5a88705c65b 100644 --- a/packages/@aws-cdk/aws-athena/package.json +++ b/packages/@aws-cdk/aws-athena/package.json @@ -73,12 +73,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-autoscaling-common/package.json b/packages/@aws-cdk/aws-autoscaling-common/package.json index 71c9ac58ae59b..2a08a5bbb531c 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/package.json +++ b/packages/@aws-cdk/aws-autoscaling-common/package.json @@ -70,13 +70,13 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "awslint": { "exclude": [ diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json index 4da040eed9bd7..4e85a8e5091de 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -88,7 +88,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 8651cb7c27ba2..923e6c6adec08 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -82,7 +82,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -94,7 +94,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-autoscalingplans/package.json b/packages/@aws-cdk/aws-autoscalingplans/package.json index 73241a14455ef..ac5c4b8477e52 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/package.json +++ b/packages/@aws-cdk/aws-autoscalingplans/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-backup/package.json b/packages/@aws-cdk/aws-backup/package.json index 413589e9917fe..6993e60ac380b 100644 --- a/packages/@aws-cdk/aws-backup/package.json +++ b/packages/@aws-cdk/aws-backup/package.json @@ -82,7 +82,7 @@ "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-dynamodb": "0.0.0", @@ -94,7 +94,7 @@ "@aws-cdk/aws-rds": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-batch/package.json b/packages/@aws-cdk/aws-batch/package.json index dfd0d2e866e8f..3eee48ef2d1ca 100644 --- a/packages/@aws-cdk/aws-batch/package.json +++ b/packages/@aws-cdk/aws-batch/package.json @@ -77,7 +77,7 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -86,7 +86,7 @@ "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-ecs": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-budgets/package.json b/packages/@aws-cdk/aws-budgets/package.json index 1a912435b703e..33c5cfc91a6e7 100644 --- a/packages/@aws-cdk/aws-budgets/package.json +++ b/packages/@aws-cdk/aws-budgets/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-certificatemanager/package.json b/packages/@aws-cdk/aws-certificatemanager/package.json index ebd5112e02224..61a55b83bcfa9 100644 --- a/packages/@aws-cdk/aws-certificatemanager/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/package.json @@ -74,7 +74,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -82,7 +82,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cloud9/package.json b/packages/@aws-cdk/aws-cloud9/package.json index 36186a33fa827..2333a332791eb 100644 --- a/packages/@aws-cdk/aws-cloud9/package.json +++ b/packages/@aws-cdk/aws-cloud9/package.json @@ -75,14 +75,14 @@ "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cloudformation/package.json b/packages/@aws-cdk/aws-cloudformation/package.json index a5ad8b4909d92..86384aab85a60 100644 --- a/packages/@aws-cdk/aws-cloudformation/package.json +++ b/packages/@aws-cdk/aws-cloudformation/package.json @@ -69,7 +69,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", - "@types/aws-lambda": "^8.10.39", + "@types/aws-lambda": "^8.10.61", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -84,7 +84,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -94,7 +94,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cloudfront-origins/package.json b/packages/@aws-cdk/aws-cloudfront-origins/package.json index a482d3eed0c6e..39da8785c4949 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/package.json +++ b/packages/@aws-cdk/aws-cloudfront-origins/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "pkglint": "0.0.0" @@ -75,12 +75,12 @@ "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/aws-cloudfront": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index ce572ee16d334..f1a90c70944ba 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -65,7 +65,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -79,7 +79,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -89,7 +89,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index 20bec41b6b927..be0a1486e125a 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -65,7 +65,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -82,7 +82,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -94,7 +94,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "awslint": { "exclude": [ diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/package.json b/packages/@aws-cdk/aws-cloudwatch-actions/package.json index fed2f5d6267d2..d3c33a5a5e83d 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/package.json +++ b/packages/@aws-cdk/aws-cloudwatch-actions/package.json @@ -74,7 +74,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -84,7 +84,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cloudwatch/package.json b/packages/@aws-cdk/aws-cloudwatch/package.json index d9e6c1448589b..522d45c2c65f6 100644 --- a/packages/@aws-cdk/aws-cloudwatch/package.json +++ b/packages/@aws-cdk/aws-cloudwatch/package.json @@ -74,13 +74,13 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "awslint": { "exclude": [ diff --git a/packages/@aws-cdk/aws-codebuild/package.json b/packages/@aws-cdk/aws-codebuild/package.json index 023b3ca9a8965..5dcdb021dff7c 100644 --- a/packages/@aws-cdk/aws-codebuild/package.json +++ b/packages/@aws-cdk/aws-codebuild/package.json @@ -71,7 +71,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -93,7 +93,7 @@ "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -111,7 +111,7 @@ "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codecommit/package.json b/packages/@aws-cdk/aws-codecommit/package.json index 467df3927cdf3..98ee6418e8c12 100644 --- a/packages/@aws-cdk/aws-codecommit/package.json +++ b/packages/@aws-cdk/aws-codecommit/package.json @@ -71,7 +71,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -82,14 +82,14 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index c7169dfb2dfc6..9862b256c6678 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -84,7 +84,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -97,7 +97,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index 010418381bdc3..20285133f7606 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -79,7 +79,7 @@ "peerDependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codepipeline-actions/package.json b/packages/@aws-cdk/aws-codepipeline-actions/package.json index 0054aaece4e88..eacc0661163b4 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/package.json +++ b/packages/@aws-cdk/aws-codepipeline-actions/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-cloudtrail": "0.0.0", - "@types/lodash": "^4.14.157", + "@types/lodash": "^4.14.160", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -93,7 +93,7 @@ "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", "case": "1.6.3", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -115,7 +115,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "bundledDependencies": [ "case" diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 097e42970e532..a372ef3d0f00e 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -83,7 +83,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -92,7 +92,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codestar/package.json b/packages/@aws-cdk/aws-codestar/package.json index 3d4f36e50f0e3..1b813576d9694 100644 --- a/packages/@aws-cdk/aws-codestar/package.json +++ b/packages/@aws-cdk/aws-codestar/package.json @@ -75,12 +75,12 @@ "dependencies": { "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-codestarnotifications/package.json b/packages/@aws-cdk/aws-codestarnotifications/package.json index 4792ef56f6067..7262362dafa5a 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/package.json +++ b/packages/@aws-cdk/aws-codestarnotifications/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index b88d41e091c0f..0affaf0812b44 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -88,7 +88,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-config/package.json b/packages/@aws-cdk/aws-config/package.json index 91269fbc4a527..7888a4c70479e 100644 --- a/packages/@aws-cdk/aws-config/package.json +++ b/packages/@aws-cdk/aws-config/package.json @@ -78,7 +78,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -87,7 +87,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-datapipeline/package.json b/packages/@aws-cdk/aws-datapipeline/package.json index 01a010281dc65..3c1f8105739ad 100644 --- a/packages/@aws-cdk/aws-datapipeline/package.json +++ b/packages/@aws-cdk/aws-datapipeline/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-dax/package.json b/packages/@aws-cdk/aws-dax/package.json index 26af5a481d81b..b856b24216a89 100644 --- a/packages/@aws-cdk/aws-dax/package.json +++ b/packages/@aws-cdk/aws-dax/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-directoryservice/package.json b/packages/@aws-cdk/aws-directoryservice/package.json index 08c4f22f761dc..f977f48e9a0ba 100644 --- a/packages/@aws-cdk/aws-directoryservice/package.json +++ b/packages/@aws-cdk/aws-directoryservice/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-dlm/package.json b/packages/@aws-cdk/aws-dlm/package.json index b059dfd3d897c..3eba4edcc1fc5 100644 --- a/packages/@aws-cdk/aws-dlm/package.json +++ b/packages/@aws-cdk/aws-dlm/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-dms/package.json b/packages/@aws-cdk/aws-dms/package.json index 033e6d9934c7d..dcae3650803f0 100644 --- a/packages/@aws-cdk/aws-dms/package.json +++ b/packages/@aws-cdk/aws-dms/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-docdb/package.json b/packages/@aws-cdk/aws-docdb/package.json index b5b826f599b88..d9e171c65b471 100644 --- a/packages/@aws-cdk/aws-docdb/package.json +++ b/packages/@aws-cdk/aws-docdb/package.json @@ -78,7 +78,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-efs": "0.0.0", @@ -86,7 +86,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-dynamodb-global/package.json b/packages/@aws-cdk/aws-dynamodb-global/package.json index b0b47ebdb729b..5c81160c134b0 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/package.json @@ -51,7 +51,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "devDependencies": { "@aws-cdk/assert": "0.0.0", @@ -66,7 +66,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "scripts": { "build": "cdk-build", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 51fcea65ce3b2..41bc2d44ead24 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -65,37 +65,37 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.4", - "aws-sdk": "^2.736.0", + "@types/jest": "^26.0.10", + "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^25.5.4", "pkglint": "0.0.0", - "sinon": "^9.0.2", - "ts-jest": "^26.1.3" + "sinon": "^9.0.3", + "ts-jest": "^26.2.0" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", + "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", + "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ec2/package.json b/packages/@aws-cdk/aws-ec2/package.json index e4f2ea1193925..9dc2e0c6a261b 100644 --- a/packages/@aws-cdk/aws-ec2/package.json +++ b/packages/@aws-cdk/aws-ec2/package.json @@ -84,7 +84,7 @@ "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -100,7 +100,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index 6fef7294c4df6..e72a6f77b301f 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -80,7 +80,7 @@ "@aws-cdk/assets": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "minimatch": "^3.0.4", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -91,7 +91,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "nyc": { "statements": 70 diff --git a/packages/@aws-cdk/aws-ecr/package.json b/packages/@aws-cdk/aws-ecr/package.json index d4596117546b8..0521418925521 100644 --- a/packages/@aws-cdk/aws-ecr/package.json +++ b/packages/@aws-cdk/aws-ecr/package.json @@ -80,7 +80,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -88,7 +88,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ecs-patterns/package.json b/packages/@aws-cdk/aws-ecs-patterns/package.json index 4cf84f3fa0910..d0f8222a497ea 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/package.json +++ b/packages/@aws-cdk/aws-ecs-patterns/package.json @@ -83,7 +83,7 @@ "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -100,7 +100,7 @@ "@aws-cdk/aws-servicediscovery": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index 71e52d5e81aa3..27c113cf8a54b 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -98,7 +98,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -125,7 +125,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-efs/package.json b/packages/@aws-cdk/aws-efs/package.json index 0115cdbd4baee..ec64229c39fc6 100644 --- a/packages/@aws-cdk/aws-efs/package.json +++ b/packages/@aws-cdk/aws-efs/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -85,7 +85,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-eks-legacy/package.json b/packages/@aws-cdk/aws-eks-legacy/package.json index 573a1d300aa95..b91810dad9758 100644 --- a/packages/@aws-cdk/aws-eks-legacy/package.json +++ b/packages/@aws-cdk/aws-eks-legacy/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -90,7 +90,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 0fdb3a1d5d055..66643584593eb 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -66,13 +66,13 @@ "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.2.0", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.0.2" + "sinon": "^9.0.3" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", @@ -83,7 +83,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "yaml": "1.10.0" }, "bundledDependencies": [ @@ -99,7 +99,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-eks/rosetta/default.ts-fixture b/packages/@aws-cdk/aws-eks/rosetta/default.ts-fixture new file mode 100644 index 0000000000000..65a6aabb9e5b4 --- /dev/null +++ b/packages/@aws-cdk/aws-eks/rosetta/default.ts-fixture @@ -0,0 +1,10 @@ +import * as cdk from '@aws-cdk/core'; +import * as eks from '@aws-cdk/aws-eks'; + +class Context extends cdk.Construct { + constructor(scope: cdk.Construct, id: string) { + super(scope, id); + + /// here + } +} diff --git a/packages/@aws-cdk/aws-elasticache/package.json b/packages/@aws-cdk/aws-elasticache/package.json index a455695ce4b75..4e7bb129572bd 100644 --- a/packages/@aws-cdk/aws-elasticache/package.json +++ b/packages/@aws-cdk/aws-elasticache/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/package.json b/packages/@aws-cdk/aws-elasticbeanstalk/package.json index 911666bd2962f..e0ce7edaa9258 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/package.json +++ b/packages/@aws-cdk/aws-elasticbeanstalk/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index 88c3a07eb4e43..b48480d426c29 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -74,13 +74,13 @@ "dependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json index bda8eaf808744..ff40789ebd426 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/package.json @@ -72,7 +72,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -81,7 +81,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json index 0e5deb8b54d99..008084ce1034c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/package.json @@ -72,7 +72,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -81,7 +81,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 4afea909c5575..275c85044f388 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -80,7 +80,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -91,7 +91,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/region-info": "0.0.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-elasticsearch/package.json b/packages/@aws-cdk/aws-elasticsearch/package.json index 08d0f7bc07955..3924a972f06b2 100644 --- a/packages/@aws-cdk/aws-elasticsearch/package.json +++ b/packages/@aws-cdk/aws-elasticsearch/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-emr/package.json b/packages/@aws-cdk/aws-emr/package.json index f1bd38b3cdfe0..494fe248be53d 100644 --- a/packages/@aws-cdk/aws-emr/package.json +++ b/packages/@aws-cdk/aws-emr/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-events-targets/package.json b/packages/@aws-cdk/aws-events-targets/package.json index 39bd37cff9bdd..1d5b00a5f6308 100644 --- a/packages/@aws-cdk/aws-events-targets/package.json +++ b/packages/@aws-cdk/aws-events-targets/package.json @@ -69,7 +69,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-codecommit": "0.0.0", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -91,7 +91,7 @@ "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-kinesis": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -108,7 +108,7 @@ "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/aws-kinesis": "0.0.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index d9dda9e4dc98c..b1505b5bc050c 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -75,13 +75,13 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-eventschemas/package.json b/packages/@aws-cdk/aws-eventschemas/package.json index 046e548e0475b..c2844140889be 100644 --- a/packages/@aws-cdk/aws-eventschemas/package.json +++ b/packages/@aws-cdk/aws-eventschemas/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-fms/package.json b/packages/@aws-cdk/aws-fms/package.json index 8e4503807200a..9dcdef1863963 100644 --- a/packages/@aws-cdk/aws-fms/package.json +++ b/packages/@aws-cdk/aws-fms/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-fsx/package.json b/packages/@aws-cdk/aws-fsx/package.json index dc173c9be4b82..f6187a29111af 100644 --- a/packages/@aws-cdk/aws-fsx/package.json +++ b/packages/@aws-cdk/aws-fsx/package.json @@ -77,14 +77,14 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-gamelift/package.json b/packages/@aws-cdk/aws-gamelift/package.json index 39bddd7eeb62e..4ee1873b7aede 100644 --- a/packages/@aws-cdk/aws-gamelift/package.json +++ b/packages/@aws-cdk/aws-gamelift/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-globalaccelerator/package.json b/packages/@aws-cdk/aws-globalaccelerator/package.json index 49db0a72b68de..c26fec36a9071 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/package.json +++ b/packages/@aws-cdk/aws-globalaccelerator/package.json @@ -77,12 +77,12 @@ "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/custom-resources": "0.0.0" }, "engines": { diff --git a/packages/@aws-cdk/aws-glue/package.json b/packages/@aws-cdk/aws-glue/package.json index e16e845d7073b..82d469b3fc9f4 100644 --- a/packages/@aws-cdk/aws-glue/package.json +++ b/packages/@aws-cdk/aws-glue/package.json @@ -77,7 +77,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -85,7 +85,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-greengrass/package.json b/packages/@aws-cdk/aws-greengrass/package.json index 9cd823f6a433f..b599c76dbbd52 100644 --- a/packages/@aws-cdk/aws-greengrass/package.json +++ b/packages/@aws-cdk/aws-greengrass/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-guardduty/package.json b/packages/@aws-cdk/aws-guardduty/package.json index 25568e60614ac..69cbb56806f67 100644 --- a/packages/@aws-cdk/aws-guardduty/package.json +++ b/packages/@aws-cdk/aws-guardduty/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index e9488d8112ef5..fb49de1b4f2f7 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -70,17 +70,17 @@ "cfn2ts": "0.0.0", "jest": "^25.5.4", "pkglint": "0.0.0", - "sinon": "^9.0.2" + "sinon": "^9.0.3" }, "dependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "engines": { diff --git a/packages/@aws-cdk/aws-inspector/package.json b/packages/@aws-cdk/aws-inspector/package.json index c673749ed6682..193fdd6d9e67d 100644 --- a/packages/@aws-cdk/aws-inspector/package.json +++ b/packages/@aws-cdk/aws-inspector/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iot/package.json b/packages/@aws-cdk/aws-iot/package.json index 88320ac412fbc..2db587479e5c8 100644 --- a/packages/@aws-cdk/aws-iot/package.json +++ b/packages/@aws-cdk/aws-iot/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iot1click/package.json b/packages/@aws-cdk/aws-iot1click/package.json index bef812a929ec1..456e4850d38f4 100644 --- a/packages/@aws-cdk/aws-iot1click/package.json +++ b/packages/@aws-cdk/aws-iot1click/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iotanalytics/package.json b/packages/@aws-cdk/aws-iotanalytics/package.json index d26ee62ea7ec0..07667a23b94e5 100644 --- a/packages/@aws-cdk/aws-iotanalytics/package.json +++ b/packages/@aws-cdk/aws-iotanalytics/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iotevents/package.json b/packages/@aws-cdk/aws-iotevents/package.json index 5b2892558f3d2..456ae624b19fb 100644 --- a/packages/@aws-cdk/aws-iotevents/package.json +++ b/packages/@aws-cdk/aws-iotevents/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-iotthingsgraph/package.json b/packages/@aws-cdk/aws-iotthingsgraph/package.json index 374eac0d129f7..b54e9519b2aad 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/package.json +++ b/packages/@aws-cdk/aws-iotthingsgraph/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-kinesis/package.json b/packages/@aws-cdk/aws-kinesis/package.json index acd9f40d7da9d..70bedee84671b 100644 --- a/packages/@aws-cdk/aws-kinesis/package.json +++ b/packages/@aws-cdk/aws-kinesis/package.json @@ -75,7 +75,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -83,7 +83,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-kinesisanalytics/package.json b/packages/@aws-cdk/aws-kinesisanalytics/package.json index 40c0a6f75ba32..7b8b27681f321 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/package.json +++ b/packages/@aws-cdk/aws-kinesisanalytics/package.json @@ -74,12 +74,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-kinesisfirehose/package.json b/packages/@aws-cdk/aws-kinesisfirehose/package.json index f5ed91901be94..c1f716d537d38 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/package.json +++ b/packages/@aws-cdk/aws-kinesisfirehose/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-kms/package.json b/packages/@aws-cdk/aws-kms/package.json index 22f87123c0c6b..de8e5ea22cec5 100644 --- a/packages/@aws-cdk/aws-kms/package.json +++ b/packages/@aws-cdk/aws-kms/package.json @@ -74,13 +74,13 @@ "dependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lakeformation/package.json b/packages/@aws-cdk/aws-lakeformation/package.json index 82204d36c6238..632c955c75447 100644 --- a/packages/@aws-cdk/aws-lakeformation/package.json +++ b/packages/@aws-cdk/aws-lakeformation/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lambda-destinations/package.json b/packages/@aws-cdk/aws-lambda-destinations/package.json index 83e0707cfe54e..0741d9fe40341 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/package.json +++ b/packages/@aws-cdk/aws-lambda-destinations/package.json @@ -73,7 +73,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -83,7 +83,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index 853b6ef9ebfd8..d8459753b0292 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -95,7 +95,7 @@ "@aws-cdk/aws-sns-subscriptions": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index e0722665bb319..e6020349ab914 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -69,13 +69,13 @@ "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts index 7461a88627f2f..e0cdc0ba44ba1 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts @@ -60,7 +60,7 @@ test('Parcel bundling', () => { }); // Correctly updates package.json - const call = writeFileSyncMock.mock.calls[0]; + const call: any = writeFileSyncMock.mock.calls[0]; expect(call[0]).toMatch('package.json'); expect(JSON.parse(call[1])).toEqual(expect.objectContaining({ targets: { @@ -144,7 +144,7 @@ test('Parcel bundling with externals and dependencies', () => { }); // Correctly updates package.json - const call = writeFileSyncMock.mock.calls[0]; + const call: any = writeFileSyncMock.mock.calls[0]; expect(call[0]).toMatch('package.json'); expect(JSON.parse(call[1])).toEqual(expect.objectContaining({ targets: expect.objectContaining({ diff --git a/packages/@aws-cdk/aws-lambda-python/package.json b/packages/@aws-cdk/aws-lambda-python/package.json index ccf141dfe1a08..727a511f1b872 100644 --- a/packages/@aws-cdk/aws-lambda-python/package.json +++ b/packages/@aws-cdk/aws-lambda-python/package.json @@ -67,13 +67,13 @@ "dependencies": { "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 234a23cf9f011..a415a22928661 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -68,20 +68,20 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/aws-lambda": "^8.10.39", - "@types/lodash": "^4.14.157", + "@types/aws-lambda": "^8.10.61", + "@types/lodash": "^4.14.160", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.4", - "aws-sdk": "^2.736.0", + "@types/sinon": "^9.0.5", + "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "lodash": "^4.17.20", - "nock": "^13.0.2", + "nock": "^13.0.4", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.0.2" + "sinon": "^9.0.3" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", @@ -97,7 +97,7 @@ "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -114,7 +114,7 @@ "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-logs-destinations/package.json b/packages/@aws-cdk/aws-logs-destinations/package.json index c8f2488210f62..8b66e13d572b8 100644 --- a/packages/@aws-cdk/aws-logs-destinations/package.json +++ b/packages/@aws-cdk/aws-logs-destinations/package.json @@ -72,7 +72,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -81,7 +81,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index bed661f52e891..4741ab59ced02 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -75,14 +75,14 @@ "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-managedblockchain/package.json b/packages/@aws-cdk/aws-managedblockchain/package.json index 695a7a7265a2e..a56aa49f8ea96 100644 --- a/packages/@aws-cdk/aws-managedblockchain/package.json +++ b/packages/@aws-cdk/aws-managedblockchain/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-mediaconvert/package.json b/packages/@aws-cdk/aws-mediaconvert/package.json index 6ad521b2eec8e..054459c8e8f7b 100644 --- a/packages/@aws-cdk/aws-mediaconvert/package.json +++ b/packages/@aws-cdk/aws-mediaconvert/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-medialive/package.json b/packages/@aws-cdk/aws-medialive/package.json index 20f44637e68b0..3eee0925e2b3c 100644 --- a/packages/@aws-cdk/aws-medialive/package.json +++ b/packages/@aws-cdk/aws-medialive/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-mediastore/package.json b/packages/@aws-cdk/aws-mediastore/package.json index 21ebd0bab5142..16b578b0e0a52 100644 --- a/packages/@aws-cdk/aws-mediastore/package.json +++ b/packages/@aws-cdk/aws-mediastore/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-msk/package.json b/packages/@aws-cdk/aws-msk/package.json index 337cb5a1d68fb..b424ceefb383b 100644 --- a/packages/@aws-cdk/aws-msk/package.json +++ b/packages/@aws-cdk/aws-msk/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-neptune/package.json b/packages/@aws-cdk/aws-neptune/package.json index a26c121ac7188..df23125bc8c40 100644 --- a/packages/@aws-cdk/aws-neptune/package.json +++ b/packages/@aws-cdk/aws-neptune/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-opsworks/package.json b/packages/@aws-cdk/aws-opsworks/package.json index 2d94bde5f00c7..fafddad6199b3 100644 --- a/packages/@aws-cdk/aws-opsworks/package.json +++ b/packages/@aws-cdk/aws-opsworks/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-opsworkscm/package.json b/packages/@aws-cdk/aws-opsworkscm/package.json index 692ee7779a53c..83ddae38f0d9a 100644 --- a/packages/@aws-cdk/aws-opsworkscm/package.json +++ b/packages/@aws-cdk/aws-opsworkscm/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-pinpoint/package.json b/packages/@aws-cdk/aws-pinpoint/package.json index 8761fd6f2e89d..85fceb5c5e2de 100644 --- a/packages/@aws-cdk/aws-pinpoint/package.json +++ b/packages/@aws-cdk/aws-pinpoint/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-pinpointemail/package.json b/packages/@aws-cdk/aws-pinpointemail/package.json index 4a1c6e6dd1ae7..c46af8fa39dc6 100644 --- a/packages/@aws-cdk/aws-pinpointemail/package.json +++ b/packages/@aws-cdk/aws-pinpointemail/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-qldb/package.json b/packages/@aws-cdk/aws-qldb/package.json index 250d1751c64e2..282c54c382fab 100644 --- a/packages/@aws-cdk/aws-qldb/package.json +++ b/packages/@aws-cdk/aws-qldb/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ram/package.json b/packages/@aws-cdk/aws-ram/package.json index 7437999790086..b190ff47f16f2 100644 --- a/packages/@aws-cdk/aws-ram/package.json +++ b/packages/@aws-cdk/aws-ram/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index fc563305585b4..16c5a4f10ad4f 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -83,7 +83,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -97,7 +97,7 @@ "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-redshift/package.json b/packages/@aws-cdk/aws-redshift/package.json index b1794c1fb9137..160997e58866b 100644 --- a/packages/@aws-cdk/aws-redshift/package.json +++ b/packages/@aws-cdk/aws-redshift/package.json @@ -77,7 +77,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -87,7 +87,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-robomaker/package.json b/packages/@aws-cdk/aws-robomaker/package.json index e127fc4add0f3..f712920916864 100644 --- a/packages/@aws-cdk/aws-robomaker/package.json +++ b/packages/@aws-cdk/aws-robomaker/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-route53-patterns/package.json b/packages/@aws-cdk/aws-route53-patterns/package.json index d2ec5df50127f..cd67cc5729336 100644 --- a/packages/@aws-cdk/aws-route53-patterns/package.json +++ b/packages/@aws-cdk/aws-route53-patterns/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -88,7 +88,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index cb79a9a4a4fa3..4f98390aaaa3d 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -80,7 +80,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -95,7 +95,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 45e3a261ccdc2..7115f213f71d3 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -77,7 +77,7 @@ "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -85,7 +85,7 @@ "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-route53resolver/package.json b/packages/@aws-cdk/aws-route53resolver/package.json index 9e2e4ae3d9185..c64c14efe58a0 100644 --- a/packages/@aws-cdk/aws-route53resolver/package.json +++ b/packages/@aws-cdk/aws-route53resolver/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-s3-assets/package.json b/packages/@aws-cdk/aws-s3-assets/package.json index 72a07d038b1b6..ee888f697ab11 100644 --- a/packages/@aws-cdk/aws-s3-assets/package.json +++ b/packages/@aws-cdk/aws-s3-assets/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -86,7 +86,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 5a449acdef2a7..72a630108c040 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -79,7 +79,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "jest": "^25.5.4", @@ -92,7 +92,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -102,7 +102,7 @@ "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-s3-notifications/package.json b/packages/@aws-cdk/aws-s3-notifications/package.json index 9d4381ade5e86..928db63f094c2 100644 --- a/packages/@aws-cdk/aws-s3-notifications/package.json +++ b/packages/@aws-cdk/aws-s3-notifications/package.json @@ -72,7 +72,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -82,7 +82,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-s3/package.json b/packages/@aws-cdk/aws-s3/package.json index d6ba2a1de0f55..fa59007748c9b 100644 --- a/packages/@aws-cdk/aws-s3/package.json +++ b/packages/@aws-cdk/aws-s3/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -84,7 +84,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sagemaker/package.json b/packages/@aws-cdk/aws-sagemaker/package.json index 31cfbf23b011f..27b7b63defe7d 100644 --- a/packages/@aws-cdk/aws-sagemaker/package.json +++ b/packages/@aws-cdk/aws-sagemaker/package.json @@ -72,11 +72,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index 2ae4f4a194622..7407ae6bc4725 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -66,20 +66,20 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^25.5.4", "pkglint": "0.0.0", - "ts-jest": "^26.1.3" + "ts-jest": "^26.2.0" }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sdb/package.json b/packages/@aws-cdk/aws-sdb/package.json index 0449b073cb18b..28306afab851f 100644 --- a/packages/@aws-cdk/aws-sdb/package.json +++ b/packages/@aws-cdk/aws-sdb/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-secretsmanager/package.json b/packages/@aws-cdk/aws-secretsmanager/package.json index e606e8bd1623f..9e20c99d815bc 100644 --- a/packages/@aws-cdk/aws-secretsmanager/package.json +++ b/packages/@aws-cdk/aws-secretsmanager/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/aws-ec2": "0.0.0", @@ -88,7 +88,7 @@ "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-sam": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-securityhub/package.json b/packages/@aws-cdk/aws-securityhub/package.json index dd69a0c87f8ce..9e83d4b6b198b 100644 --- a/packages/@aws-cdk/aws-securityhub/package.json +++ b/packages/@aws-cdk/aws-securityhub/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-servicecatalog/package.json b/packages/@aws-cdk/aws-servicecatalog/package.json index b4206f0798b8e..4461cc42185cb 100644 --- a/packages/@aws-cdk/aws-servicecatalog/package.json +++ b/packages/@aws-cdk/aws-servicecatalog/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-servicediscovery/package.json b/packages/@aws-cdk/aws-servicediscovery/package.json index e03bf2bba09a8..15308644064a3 100644 --- a/packages/@aws-cdk/aws-servicediscovery/package.json +++ b/packages/@aws-cdk/aws-servicediscovery/package.json @@ -79,7 +79,7 @@ "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -87,7 +87,7 @@ "@aws-cdk/aws-elasticloadbalancingv2": "0.0.0", "@aws-cdk/aws-route53": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ses-actions/package.json b/packages/@aws-cdk/aws-ses-actions/package.json index fb881ce99d964..f8b9b42302ca6 100644 --- a/packages/@aws-cdk/aws-ses-actions/package.json +++ b/packages/@aws-cdk/aws-ses-actions/package.json @@ -75,7 +75,7 @@ "@aws-cdk/aws-ses": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -86,7 +86,7 @@ "@aws-cdk/aws-ses": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ses/package.json b/packages/@aws-cdk/aws-ses/package.json index 55d89a9f30ee4..366ebfe579cea 100644 --- a/packages/@aws-cdk/aws-ses/package.json +++ b/packages/@aws-cdk/aws-ses/package.json @@ -75,14 +75,14 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sns-subscriptions/package.json b/packages/@aws-cdk/aws-sns-subscriptions/package.json index 628185af18f75..ad794f978be1c 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/package.json +++ b/packages/@aws-cdk/aws-sns-subscriptions/package.json @@ -72,7 +72,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -81,7 +81,7 @@ "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sns/package.json b/packages/@aws-cdk/aws-sns/package.json index d862d55d890a5..b6d5a164ddbef 100644 --- a/packages/@aws-cdk/aws-sns/package.json +++ b/packages/@aws-cdk/aws-sns/package.json @@ -82,7 +82,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -92,7 +92,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-sqs/package.json b/packages/@aws-cdk/aws-sqs/package.json index 15d3dd810d62b..1d149cddc2150 100644 --- a/packages/@aws-cdk/aws-sqs/package.json +++ b/packages/@aws-cdk/aws-sqs/package.json @@ -66,7 +66,7 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", @@ -78,7 +78,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -86,7 +86,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-ssm/package.json b/packages/@aws-cdk/aws-ssm/package.json index d890f3c7e2734..3220cb04f17ec 100644 --- a/packages/@aws-cdk/aws-ssm/package.json +++ b/packages/@aws-cdk/aws-ssm/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -84,7 +84,7 @@ "@aws-cdk/aws-kms": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 821efcfb58ca7..2758eb9ad530e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -87,7 +87,7 @@ "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -109,7 +109,7 @@ "@aws-cdk/aws-sqs": "0.0.0", "@aws-cdk/aws-stepfunctions": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-stepfunctions/package.json b/packages/@aws-cdk/aws-stepfunctions/package.json index 00efa57ce85b8..89254abcb7407 100644 --- a/packages/@aws-cdk/aws-stepfunctions/package.json +++ b/packages/@aws-cdk/aws-stepfunctions/package.json @@ -76,7 +76,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -85,7 +85,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-synthetics/package.json b/packages/@aws-cdk/aws-synthetics/package.json index 985c8b2178804..19f8f1982a627 100644 --- a/packages/@aws-cdk/aws-synthetics/package.json +++ b/packages/@aws-cdk/aws-synthetics/package.json @@ -78,7 +78,7 @@ "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", @@ -86,7 +86,7 @@ "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-transfer/package.json b/packages/@aws-cdk/aws-transfer/package.json index 5bb2c4728dbdf..037df5db1a49e 100644 --- a/packages/@aws-cdk/aws-transfer/package.json +++ b/packages/@aws-cdk/aws-transfer/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-waf/package.json b/packages/@aws-cdk/aws-waf/package.json index 845089dd52ab9..5061d49c96d24 100644 --- a/packages/@aws-cdk/aws-waf/package.json +++ b/packages/@aws-cdk/aws-waf/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-wafregional/package.json b/packages/@aws-cdk/aws-wafregional/package.json index e0b494237dbaf..a1dde0aa29202 100644 --- a/packages/@aws-cdk/aws-wafregional/package.json +++ b/packages/@aws-cdk/aws-wafregional/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-wafv2/package.json b/packages/@aws-cdk/aws-wafv2/package.json index 536432bcb5a7d..1e4f6a918de64 100644 --- a/packages/@aws-cdk/aws-wafv2/package.json +++ b/packages/@aws-cdk/aws-wafv2/package.json @@ -73,11 +73,11 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/aws-workspaces/package.json b/packages/@aws-cdk/aws-workspaces/package.json index e6672fbeb19b0..72b2e25e19ce3 100644 --- a/packages/@aws-cdk/aws-workspaces/package.json +++ b/packages/@aws-cdk/aws-workspaces/package.json @@ -71,12 +71,12 @@ }, "dependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 4a3f52d24155f..30c3b8705771a 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -47,7 +47,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "cdk-build-tools": "0.0.0", "jest": "^25.5.4", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/cfnspec/package.json b/packages/@aws-cdk/cfnspec/package.json index 42a75db2906aa..8a9e9f1907e66 100644 --- a/packages/@aws-cdk/cfnspec/package.json +++ b/packages/@aws-cdk/cfnspec/package.json @@ -23,7 +23,7 @@ "main": "lib/index.js", "types": "lib/index.d.ts", "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/md5": "^2.2.0", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", @@ -35,7 +35,7 @@ "sort-json": "^2.0.0" }, "dependencies": { - "md5": "^2.2.1" + "md5": "^2.3.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 3e877257e9390..89ba9b9bdbdcd 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -48,11 +48,11 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/mock-fs": "^4.10.0", "cdk-build-tools": "0.0.0", "jest": "^25.5.4", - "mock-fs": "^4.12.0", + "mock-fs": "^4.13.0", "pkglint": "0.0.0", "typescript-json-schema": "^0.42.0" }, diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 9ae38d5877c09..aa9882ffa31de 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -29,14 +29,14 @@ "table": "^5.4.6" }, "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/string-width": "^4.0.1", "@types/table": "^4.0.7", "cdk-build-tools": "0.0.0", "fast-check": "^1.26.0", "jest": "^25.5.4", "pkglint": "0.0.0", - "ts-jest": "^26.1.3" + "ts-jest": "^26.2.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index 7261179f66045..8383cae076334 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -300,17 +300,17 @@ "@aws-cdk/aws-wafv2": "0.0.0", "@aws-cdk/aws-workspaces": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/yaml": "1.2.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "jest": "^25.4.0", "pkglint": "0.0.0", - "ts-jest": "^26.1.3" + "ts-jest": "^26.2.0" }, "bundledDependencies": [ "yaml" diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index 365c835f0af19..e71ef1f3f3841 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -152,26 +152,26 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/lodash": "^4.14.157", + "@types/lodash": "^4.14.160", + "@types/minimatch": "^3.0.3", "@types/node": "^10.17.28", "@types/nodeunit": "^0.0.31", - "@types/minimatch": "^3.0.3", - "@types/sinon": "^9.0.4", + "@types/sinon": "^9.0.5", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "fast-check": "^1.26.0", "lodash": "^4.17.20", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.0.2", + "sinon": "^9.0.3", "ts-mock-imports": "^1.3.0" }, "dependencies": { - "fs-extra": "^9.0.1", - "minimatch": "^3.0.4", - "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/cloud-assembly-schema": "0.0.0", - "constructs": "^3.0.2" + "@aws-cdk/cx-api": "0.0.0", + "constructs": "^3.0.4", + "fs-extra": "^9.0.1", + "minimatch": "^3.0.4" }, "bundledDependencies": [ "fs-extra", @@ -181,7 +181,7 @@ "peerDependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index dc6fa0e9c7cf4..e4590c7a01183 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -71,18 +71,18 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-ssm": "0.0.0", - "@types/aws-lambda": "^8.10.39", - "@types/fs-extra": "^8.1.0", - "@types/sinon": "^9.0.4", - "aws-sdk": "^2.736.0", + "@types/aws-lambda": "^8.10.61", + "@types/fs-extra": "^8.1.1", + "@types/sinon": "^9.0.5", + "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "fs-extra": "^9.0.1", - "nock": "^13.0.2", + "nock": "^13.0.4", "pkglint": "0.0.0", - "sinon": "^9.0.2" + "sinon": "^9.0.3" }, "dependencies": { "@aws-cdk/aws-cloudformation": "0.0.0", @@ -91,7 +91,7 @@ "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -101,7 +101,7 @@ "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-sns": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index 836395f175f5a..5d9c131435aed 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -46,20 +46,20 @@ "organization": true }, "dependencies": { - "semver": "^7.2.2", - "@aws-cdk/cloud-assembly-schema": "0.0.0" + "@aws-cdk/cloud-assembly-schema": "0.0.0", + "semver": "^7.2.2" }, "peerDependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0" }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/mock-fs": "^4.10.0", "@types/semver": "^7.3.3", "cdk-build-tools": "0.0.0", "jest": "^25.5.4", - "mock-fs": "^4.12.0", + "mock-fs": "^4.13.0", "pkglint": "0.0.0" }, "repository": { diff --git a/packages/@aws-cdk/example-construct-library/package.json b/packages/@aws-cdk/example-construct-library/package.json index 230cc5c4cee78..2dc201596864e 100644 --- a/packages/@aws-cdk/example-construct-library/package.json +++ b/packages/@aws-cdk/example-construct-library/package.json @@ -74,7 +74,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { @@ -84,7 +84,7 @@ "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/core": "0.0.0", - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index 80c690264917d..73ccb9fc14063 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -40,7 +40,7 @@ "@aws-cdk/aws-ecr-assets": "0.0.0" }, "peerDependencies": { - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-codepipeline": "0.0.0", @@ -53,7 +53,7 @@ "@aws-cdk/aws-cloudformation": "0.0.0" }, "dependencies": { - "constructs": "^3.0.2", + "constructs": "^3.0.4", "@aws-cdk/core": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0", "@aws-cdk/aws-codepipeline": "0.0.0", diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index 260082f9c02a8..a4f2f01f227de 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -54,7 +54,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "cdk-build-tools": "0.0.0", "fs-extra": "^9.0.1", "pkglint": "0.0.0" diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index 45a0390132ba7..25dd458b0f190 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -33,23 +33,23 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^26.0.4", + "@monocdk-experiment/rewrite-imports": "0.0.0", + "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "cdk-build-tools": "0.0.0", + "constructs": "^3.0.4", "jest": "^25.5.4", - "pkglint": "0.0.0", - "ts-jest": "^26.1.3", - "@monocdk-experiment/rewrite-imports": "0.0.0", "monocdk-experiment": "0.0.0", - "constructs": "^3.0.2" + "pkglint": "0.0.0", + "ts-jest": "^26.2.0" }, "dependencies": { "@aws-cdk/cloudformation-diff": "0.0.0" }, "peerDependencies": { + "constructs": "^3.0.4", "jest": "^25.5.4", - "monocdk-experiment": "^0.0.0", - "constructs": "^3.0.2" + "monocdk-experiment": "^0.0.0" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 342193d66c130..1c2835f2ec164 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -32,11 +32,11 @@ "license": "Apache-2.0", "dependencies": { "glob": "^7.1.6", - "typescript": "~3.9.6" + "typescript": "~3.9.7" }, "devDependencies": { "@types/glob": "^7.1.3", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/node": "^10.17.28", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/aws-cdk/lib/init-templates/app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/app/javascript/package.template.json index f4ce298e9069f..5547dacf3a673 100644 --- a/packages/aws-cdk/lib/init-templates/app/javascript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/javascript/package.template.json @@ -12,7 +12,7 @@ "devDependencies": { "@aws-cdk/assert": "%cdk-version%", "aws-cdk": "%cdk-version%", - "jest": "^26.0.4" + "jest": "^26.4.2" }, "dependencies": { "@aws-cdk/core": "%cdk-version%" diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json index e84da8f2739cc..8aeb1df90f6b7 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json @@ -12,13 +12,13 @@ }, "devDependencies": { "@aws-cdk/assert": "%cdk-version%", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/node": "10.17.27", - "jest": "^26.0.4", - "ts-jest": "^26.1.3", + "jest": "^26.4.2", + "ts-jest": "^26.2.0", "aws-cdk": "%cdk-version%", "ts-node": "^8.1.0", - "typescript": "~3.9.6" + "typescript": "~3.9.7" }, "dependencies": { "@aws-cdk/core": "%cdk-version%", diff --git a/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json index e3ae57482cfc5..498dd02b329a2 100644 --- a/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/lib/typescript/package.template.json @@ -10,11 +10,11 @@ }, "devDependencies": { "@aws-cdk/assert": "%cdk-version%", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/node": "10.17.27", - "jest": "^26.0.4", - "ts-jest": "^26.1.3", - "typescript": "~3.9.6" + "jest": "^26.4.2", + "ts-jest": "^26.2.0", + "typescript": "~3.9.7" }, "peerDependencies": { "@aws-cdk/core": "%cdk-version%" diff --git a/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json b/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json index 54633953bf6a9..7594be2ffb151 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/javascript/package.template.json @@ -12,7 +12,7 @@ "devDependencies": { "@aws-cdk/assert": "%cdk-version%", "aws-cdk": "%cdk-version%", - "jest": "^26.0.4" + "jest": "^26.4.2" }, "dependencies": { "@aws-cdk/aws-sns": "%cdk-version%", diff --git a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json index 7d199a6c68fc5..77d515d129e3b 100644 --- a/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/sample-app/typescript/package.template.json @@ -13,12 +13,12 @@ "devDependencies": { "aws-cdk": "%cdk-version%", "@aws-cdk/assert": "%cdk-version%", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/node": "10.17.27", - "jest": "^26.0.4", - "ts-jest": "^26.1.3", + "jest": "^26.4.2", + "ts-jest": "^26.2.0", "ts-node": "^8.1.0", - "typescript": "~3.9.6" + "typescript": "~3.9.7" }, "dependencies": { "@aws-cdk/aws-sns": "%cdk-version%", diff --git a/packages/aws-cdk/package.json b/packages/aws-cdk/package.json index 5d7d8dbc440d7..20e667f4ad0fc 100644 --- a/packages/aws-cdk/package.json +++ b/packages/aws-cdk/package.json @@ -42,15 +42,15 @@ "devDependencies": { "@aws-cdk/core": "0.0.0", "@types/archiver": "^3.1.0", - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/glob": "^7.1.3", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/minimatch": "^3.0.3", "@types/mockery": "^1.4.29", "@types/node": "^10.17.28", "@types/promptly": "^3.0.0", "@types/semver": "^7.3.3", - "@types/sinon": "^9.0.4", + "@types/sinon": "^9.0.5", "@types/table": "^4.0.7", "@types/uuid": "^8.3.0", "@types/wrap-ansi": "^3.0.0", @@ -61,8 +61,8 @@ "jest": "^25.5.4", "mockery": "^2.1.0", "pkglint": "0.0.0", - "sinon": "^9.0.2", - "ts-jest": "^26.1.3", + "sinon": "^9.0.3", + "ts-jest": "^26.2.0", "ts-mock-imports": "^1.2.6" }, "dependencies": { @@ -71,7 +71,7 @@ "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", "archiver": "^4.0.2", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "camelcase": "^6.0.0", "cdk-assets": "0.0.0", "colors": "^1.4.0", @@ -85,10 +85,10 @@ "semver": "^7.2.2", "source-map-support": "^0.5.19", "table": "^5.4.6", - "uuid": "^8.2.0", + "uuid": "^8.3.0", "wrap-ansi": "^7.0.0", "yaml": "^1.10.0", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/awslint/bin/awslint.ts b/packages/awslint/bin/awslint.ts index 2a2fe347ed5e1..1426ac60885d0 100644 --- a/packages/awslint/bin/awslint.ts +++ b/packages/awslint/bin/awslint.ts @@ -15,7 +15,7 @@ async function main() { .env('AWSLINT') .usage('awslint [options] [command]') .showHelpOnFail(true) - .command('', 'lint the current module (default)') + .command('$0', 'lint the current module (default)') .command('list', 'list all available rules') .option('include', { alias: 'i', type: 'array', desc: 'evaluate only this rule(s)', default: ['*'] }) .option('exclude', { alias: 'x', type: 'array', desc: 'do not evaludate these rules (takes priority over --include)', default: [] }) diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 3ec92848866c8..0492e36546ea5 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -16,18 +16,18 @@ "awslint": "bin/awslint" }, "dependencies": { - "@jsii/spec": "^1.9.0", + "@jsii/spec": "^1.11.0", "camelcase": "^6.0.0", "colors": "^1.4.0", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.9.0", - "yargs": "^15.3.1" + "jsii-reflect": "^1.11.0", + "yargs": "^15.4.1" }, "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/yargs": "^15.0.5", "pkglint": "0.0.0", - "typescript": "~3.9.6" + "typescript": "~3.9.7" }, "repository": { "type": "git", diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index 80f4a7559cc0a..7bf00e59950e6 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -32,24 +32,24 @@ "devDependencies": { "@types/archiver": "^3.1.0", "@types/glob": "^7.1.3", - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", + "@types/jszip": "^3.4.1", "@types/mock-fs": "^4.10.0", "@types/node": "^10.17.28", "@types/yargs": "^15.0.5", - "@types/jszip": "^3.4.1", - "jszip": "^3.5.0", "cdk-build-tools": "0.0.0", "jest": "^25.5.4", - "mock-fs": "^4.12.0", + "jszip": "^3.5.0", + "mock-fs": "^4.13.0", "pkglint": "0.0.0" }, "dependencies": { "@aws-cdk/cloud-assembly-schema": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "archiver": "^4.0.2", - "aws-sdk": "^2.736.0", + "aws-sdk": "^2.739.0", "glob": "^7.1.6", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "repository": { "url": "https://github.com/aws/aws-cdk.git", diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index b7bdbe248e5e6..f7a9dd91443e2 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -26,11 +26,11 @@ }, "license": "Apache-2.0", "dependencies": { - "codemaker": "^1.9.0", + "codemaker": "^1.11.0", "yaml": "1.10.0" }, "devDependencies": { - "@types/jest": "^26.0.4", + "@types/jest": "^26.0.10", "@types/yaml": "1.9.7", "jest": "^25.5.4" }, diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 62f438973b2c9..d6ec79db6d37d 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -179,20 +179,20 @@ "@aws-cdk/custom-resources": "0.0.0", "@aws-cdk/cx-api": "0.0.0", "@aws-cdk/region-info": "0.0.0", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "fs-extra": "^9.0.1", - "jsii-reflect": "^1.9.0", + "jsii-reflect": "^1.11.0", "jsonschema": "^1.2.6", "yaml": "1.9.2", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "devDependencies": { - "@types/fs-extra": "^8.1.0", - "@types/jest": "^26.0.4", + "@types/fs-extra": "^8.1.1", + "@types/jest": "^26.0.10", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.5", "jest": "^25.5.4", - "jsii": "^1.9.0" + "jsii": "^1.11.0" }, "keywords": [ "aws", diff --git a/packages/monocdk-experiment/package.json b/packages/monocdk-experiment/package.json index 4d54f6d2e1f28..c77e56abe1f37 100644 --- a/packages/monocdk-experiment/package.json +++ b/packages/monocdk-experiment/package.json @@ -89,7 +89,7 @@ ], "dependencies": { "case": "1.6.3", - "constructs": "^3.0.2", + "constructs": "^3.0.4", "fs-extra": "^9.0.1", "jsonschema": "^1.2.5", "minimatch": "^3.0.4", @@ -258,7 +258,7 @@ "typescript": "~3.8.3" }, "peerDependencies": { - "constructs": "^3.0.2" + "constructs": "^3.0.4" }, "homepage": "https://github.com/aws/aws-cdk", "engines": { diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 19455ed8358b6..2fd2a8a008691 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -33,29 +33,29 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/fs-extra": "^8.1.0", - "@types/jest": "^26.0.4", + "@types/fs-extra": "^8.1.1", + "@types/jest": "^26.0.10", "@types/yargs": "^15.0.5", "pkglint": "0.0.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "^3.9.1", - "@typescript-eslint/parser": "^2.19.2", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", "awslint": "0.0.0", "colors": "^1.4.0", "eslint": "^6.8.0", "eslint-import-resolver-node": "^0.3.4", - "eslint-import-resolver-typescript": "^2.0.0", + "eslint-import-resolver-typescript": "^2.2.1", "eslint-plugin-import": "^2.22.0", "fs-extra": "^9.0.1", "jest": "^25.5.4", - "jsii": "^1.9.0", - "jsii-pacmak": "^1.9.0", + "jsii": "^1.11.0", + "jsii-pacmak": "^1.11.0", "nodeunit": "^0.11.3", "nyc": "^15.1.0", - "ts-jest": "^26.1.3", - "typescript": "~3.9.6", - "yargs": "^15.3.1", + "ts-jest": "^26.2.0", + "typescript": "~3.9.7", + "yargs": "^15.4.1", "yarn-cling": "0.0.0" }, "keywords": [ diff --git a/tools/cdk-integ-tools/package.json b/tools/cdk-integ-tools/package.json index 23b74c1489650..458400f409403 100644 --- a/tools/cdk-integ-tools/package.json +++ b/tools/cdk-integ-tools/package.json @@ -29,7 +29,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/yargs": "^15.0.5", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" @@ -40,7 +40,7 @@ "@aws-cdk/assert": "0.0.0", "aws-cdk": "0.0.0", "fs-extra": "^9.0.1", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "keywords": [ "aws", diff --git a/tools/cfn2ts/package.json b/tools/cfn2ts/package.json index 068edda71fd0b..cc3b1bce4d67d 100644 --- a/tools/cfn2ts/package.json +++ b/tools/cfn2ts/package.json @@ -30,14 +30,14 @@ "license": "Apache-2.0", "dependencies": { "@aws-cdk/cfnspec": "0.0.0", - "codemaker": "^1.9.0", + "codemaker": "^1.11.0", "fast-json-patch": "^3.0.0-1", "fs-extra": "^9.0.1", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "devDependencies": { - "@types/fs-extra": "^8.1.0", - "@types/jest": "^26.0.4", + "@types/fs-extra": "^8.1.1", + "@types/jest": "^26.0.10", "@types/yargs": "^15.0.5", "cdk-build-tools": "0.0.0", "jest": "^25.5.4", diff --git a/tools/nodeunit-shim/package.json b/tools/nodeunit-shim/package.json index 49638bc3633df..d68627131d295 100644 --- a/tools/nodeunit-shim/package.json +++ b/tools/nodeunit-shim/package.json @@ -12,9 +12,9 @@ "build+test": "npm run build && npm test" }, "devDependencies": { + "@types/jest": "^26.0.10", "@types/node": "^10.17.28", - "typescript": "~3.9.6", - "@types/jest": "^26.0.4" + "typescript": "~3.9.7" }, "dependencies": { "jest": "^25.5.4" diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index bc85cd383c86a..cf89fed209354 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -1248,7 +1248,7 @@ export class ConstructsDependency extends ValidationRule { public readonly name = 'constructs/dependency'; public validate(pkg: PackageJson) { - const REQUIRED_VERSION = '^3.0.2'; + const REQUIRED_VERSION = '^3.0.4'; if (pkg.devDependencies?.constructs && pkg.devDependencies?.constructs !== REQUIRED_VERSION) { pkg.report({ diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 5d605c75bf6a8..63614b840f4d9 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -35,11 +35,11 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/semver": "^7.3.3", "@types/yargs": "^15.0.5", "jest": "^25.5.4", - "typescript": "~3.9.6" + "typescript": "~3.9.7" }, "dependencies": { "case": "^1.6.3", @@ -47,6 +47,6 @@ "fs-extra": "^9.0.1", "glob": "^7.1.6", "semver": "^7.2.2", - "yargs": "^15.3.1" + "yargs": "^15.4.1" } } diff --git a/tools/pkgtools/package.json b/tools/pkgtools/package.json index 5a843fe0e5a6b..dd54d679ee5c7 100644 --- a/tools/pkgtools/package.json +++ b/tools/pkgtools/package.json @@ -29,14 +29,14 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/fs-extra": "^8.1.0", + "@types/fs-extra": "^8.1.1", "@types/yargs": "^15.0.5", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" }, "dependencies": { "fs-extra": "^9.0.1", - "yargs": "^15.3.1" + "yargs": "^15.4.1" }, "keywords": [ "aws", diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 90d1f3b3ac692..6452a5acf74d9 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -38,12 +38,12 @@ ] }, "devDependencies": { + "@types/jest": "^26.0.10", + "@types/node": "^10.17.28", "@types/yarnpkg__lockfile": "^1.1.3", - "@types/jest": "^26.0.4", "jest": "^25.5.4", - "@types/node": "^10.17.28", - "typescript": "~3.9.6", - "pkglint": "0.0.0" + "pkglint": "0.0.0", + "typescript": "~3.9.7" }, "dependencies": { "@yarnpkg/lockfile": "^1.1.0" diff --git a/yarn.lock b/yarn.lock index 884602f4e839c..d6905ec5930bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,14 +2,7 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" - integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== - dependencies: - "@babel/highlight" "^7.8.3" - -"@babel/code-frame@^7.10.4": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== @@ -25,16 +18,16 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.0.0": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.1.tgz#2c55b604e73a40dc21b0e52650b11c65cf276643" - integrity sha512-XqF7F6FWQdKGGWAzGELL+aCO1p+lRY5Tj5/tbT3St1G8NaH70jhhDIKknIZaDans0OQBG5wRAldROLHSt44BgQ== +"@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5": + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.4.tgz#4301dfdfafa01eeb97f1896c5501a3f0655d4229" + integrity sha512-5deljj5HlqRXN+5oJTY7Zs37iH3z3b++KjiKtIsJy1NrjOOVSEaJHEetLBhyu0aQOSNNZ/0IuEAan9GzRuDXHg== dependencies: "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.11.0" + "@babel/generator" "^7.11.4" "@babel/helper-module-transforms" "^7.11.0" "@babel/helpers" "^7.10.4" - "@babel/parser" "^7.11.1" + "@babel/parser" "^7.11.4" "@babel/template" "^7.10.4" "@babel/traverse" "^7.11.0" "@babel/types" "^7.11.0" @@ -47,47 +40,15 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" - integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-module-transforms" "^7.9.0" - "@babel/helpers" "^7.9.0" - "@babel/parser" "^7.9.0" - "@babel/template" "^7.8.6" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.1" - json5 "^2.1.2" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.0.0", "@babel/generator@^7.11.0", "@babel/generator@^7.3.3": - version "7.11.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.0.tgz#4b90c78d8c12825024568cbe83ee6c9af193585c" - integrity sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ== +"@babel/generator@^7.0.0", "@babel/generator@^7.11.0", "@babel/generator@^7.11.4", "@babel/generator@^7.3.3", "@babel/generator@^7.4.0": + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be" + integrity sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g== dependencies: "@babel/types" "^7.11.0" jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" - integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== - dependencies: - "@babel/types" "^7.9.5" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -162,11 +123,10 @@ lodash "^4.17.19" "@babel/helper-explode-assignable-expression@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.4.tgz#40a1cd917bff1288f699a94a75b37a1a2dbd8c7c" - integrity sha512-4K71RyRQNPRrR85sr5QY4X3VwG4wtVoXZB9+L3r1Gp38DhELyHCtovqydRi7c1Ovb17eRGiQ/FD5s8JdU0Uy5A== + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b" + integrity sha512-ux9hm3zR4WV1Y3xXxXkdG/0gxF9nvI0YVmKVhvK9AfMoaQkemL3sJpXw+Xbz65azo8qJiEz2XVDUpK3KYhH3ZQ== dependencies: - "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" "@babel/helper-function-name@^7.10.4": @@ -178,15 +138,6 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-function-name@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" - integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== - dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.9.5" - "@babel/helper-get-function-arity@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" @@ -194,13 +145,6 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-get-function-arity@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" - integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== - dependencies: - "@babel/types" "^7.8.3" - "@babel/helper-hoist-variables@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" @@ -215,13 +159,6 @@ dependencies: "@babel/types" "^7.11.0" -"@babel/helper-member-expression-to-functions@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" - integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== - dependencies: - "@babel/types" "^7.8.3" - "@babel/helper-module-imports@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" @@ -229,13 +166,6 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-module-imports@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" - integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== - dependencies: - "@babel/types" "^7.8.3" - "@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.10.5", "@babel/helper-module-transforms@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" @@ -249,19 +179,6 @@ "@babel/types" "^7.11.0" lodash "^4.17.19" -"@babel/helper-module-transforms@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" - integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== - dependencies: - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" - "@babel/helper-simple-access" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/template" "^7.8.6" - "@babel/types" "^7.9.0" - lodash "^4.17.13" - "@babel/helper-optimise-call-expression@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" @@ -269,19 +186,7 @@ dependencies: "@babel/types" "^7.10.4" -"@babel/helper-optimise-call-expression@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" - integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== - dependencies: - "@babel/types" "^7.8.3" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" - integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== - -"@babel/helper-plugin-utils@^7.10.4": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== @@ -294,14 +199,13 @@ lodash "^4.17.19" "@babel/helper-remap-async-to-generator@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.4.tgz#fce8bea4e9690bbe923056ded21e54b4e8b68ed5" - integrity sha512-86Lsr6NNw3qTNl+TBcF1oRZMaVzJtbWTyTko+CQL/tvNvcGYEFKbLXDPxtW0HKk3McNOk4KzY55itGWCAGK5tg== + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz#4474ea9f7438f18575e30b0cac784045b402a12d" + integrity sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA== dependencies: "@babel/helper-annotate-as-pure" "^7.10.4" "@babel/helper-wrap-function" "^7.10.4" "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" "@babel/helper-replace-supers@^7.10.4": @@ -314,16 +218,6 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-replace-supers@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" - integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== - dependencies: - "@babel/helper-member-expression-to-functions" "^7.8.3" - "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.6" - "@babel/helper-simple-access@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" @@ -332,14 +226,6 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helper-simple-access@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" - integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== - dependencies: - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" - "@babel/helper-skip-transparent-expression-wrappers@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz#eec162f112c2f58d3af0af125e3bb57665146729" @@ -354,23 +240,11 @@ dependencies: "@babel/types" "^7.11.0" -"@babel/helper-split-export-declaration@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" - integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== - dependencies: - "@babel/types" "^7.8.3" - "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== -"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" - integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== - "@babel/helper-wrap-function@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" @@ -390,15 +264,6 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/helpers@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" - integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== - dependencies: - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.9.0" - "@babel/types" "^7.9.0" - "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -408,24 +273,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/highlight@^7.8.3": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" - integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== - dependencies: - "@babel/helper-validator-identifier" "^7.9.0" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.0.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.1": - version "7.11.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.3.tgz#9e1eae46738bcd08e23e867bab43e7b95299a8f9" - integrity sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA== - -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" - integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.4", "@babel/parser@^7.4.3": + version "7.11.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca" + integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA== "@babel/plugin-proposal-async-generator-functions@^7.10.4": version "7.10.5" @@ -548,20 +399,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.10.4": +"@babel/plugin-syntax-class-properties@^7.10.4", "@babel/plugin-syntax-class-properties@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.4.tgz#6644e6a0baa55a61f9e3231f6c9eeb6ee46c124c" integrity sha512-GCSBF7iUle6rNugfURwNmCGG3Z/2+opxAMLs1nND4bhEG5PuxTIggDBoeYYSujAlLtsupzOHYJQgPS3pivwXIA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz#6cb933a8872c8d359bfde69bbeaae5162fd1e8f7" - integrity sha512-UcAyQWg2bAN647Q+O811tG9MrJ38Z10jjhQdKNAL8fsyPzE3cCN/uT+f55cFVY4aGO4jqJAvmqsuY3GQDwAoXg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" @@ -604,20 +448,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-logical-assignment-operators@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.8.3.tgz#3995d7d7ffff432f6ddc742b47e730c054599897" - integrity sha512-Zpg2Sgc++37kuFl6ppq2Q7Awc6E6AIW671x5PY8E/f7MCIyPPGK/EoeZXvvY3P42exZ3Q4/t3YOzP/HiN79jDg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0", "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" @@ -625,20 +462,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4": +"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-numeric-separator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f" - integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" @@ -1090,21 +920,14 @@ "@babel/plugin-transform-react-jsx-source" "^7.10.4" "@babel/plugin-transform-react-pure-annotations" "^7.10.4" -"@babel/runtime@^7.8.4": +"@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.9.2": - version "7.9.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" - integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/template@^7.0.0", "@babel/template@^7.10.4", "@babel/template@^7.2.2": +"@babel/template@^7.0.0", "@babel/template@^7.10.4", "@babel/template@^7.2.2", "@babel/template@^7.3.3", "@babel/template@^7.4.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA== @@ -1113,16 +936,7 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" -"@babel/template@^7.3.3", "@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" - integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" - -"@babel/traverse@^7.0.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.2.3": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.2.3", "@babel/traverse@^7.4.3": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg== @@ -1137,31 +951,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" - integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.5" - "@babel/helper-function-name" "^7.9.5" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.5" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": - version "7.9.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" - integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== - dependencies: - "@babel/helper-validator-identifier" "^7.9.5" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.4.4": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA== @@ -1263,12 +1053,13 @@ integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== "@istanbuljs/load-nyc-config@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" - integrity sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg== + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== dependencies: camelcase "^5.3.1" find-up "^4.1.0" + get-package-type "^0.1.0" js-yaml "^3.13.1" resolve-from "^5.0.0" @@ -1334,13 +1125,13 @@ slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/core@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.4.0.tgz#8f42ae45640b46b4f8ffee134dcd408c210ab1ef" - integrity sha512-mpXm4OjWQbz7qbzGIiSqvfNZ1FxX6ywWgLtdSD2luPORt5zKPtqcdDnX7L8RdfMaj1znDBgN2+gB094ZIr7vnA== +"@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.0" + "@jest/reporters" "^26.4.1" "@jest/test-result" "^26.3.0" "@jest/transform" "^26.3.0" "@jest/types" "^26.3.0" @@ -1350,17 +1141,17 @@ exit "^0.1.2" graceful-fs "^4.2.4" jest-changed-files "^26.3.0" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-haste-map "^26.3.0" jest-message-util "^26.3.0" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" - jest-resolve-dependencies "^26.4.0" - jest-runner "^26.4.0" - jest-runtime "^26.4.0" - jest-snapshot "^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.0" + jest-validate "^26.4.2" jest-watcher "^26.3.0" micromatch "^4.0.2" p-each-series "^2.1.0" @@ -1419,14 +1210,14 @@ "@jest/types" "^25.5.0" expect "^25.5.0" -"@jest/globals@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.4.0.tgz#ebab3ba937a200a4b3805f2e552bdf869465ffea" - integrity sha512-QKwoVAeL9d0xaEM9ebPvfc+bolN04F+o3zM2jswGDBiiNjCogZ3LvOaqumRdDyz6kLmbx+UhgMBAVuLunbXZ2A== +"@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== dependencies: "@jest/environment" "^26.3.0" "@jest/types" "^26.3.0" - expect "^26.4.0" + expect "^26.4.2" "@jest/reporters@^25.5.1": version "25.5.1" @@ -1460,10 +1251,10 @@ optionalDependencies: node-notifier "^6.0.0" -"@jest/reporters@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.4.0.tgz#dd3f03979170dd25dc6a9b746c693b591056d753" - integrity sha512-14OPAAuYhgRBSNxAocVluX6ksdMdK/EuP9NmtBXU9g1uKaVBrPnohn/CVm6iMot1a9iU8BCxa5715YRf8FEg/A== +"@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== dependencies: "@bcoe/v8-coverage" "^0.2.3" "@jest/console" "^26.3.0" @@ -1490,7 +1281,7 @@ terminal-link "^2.0.0" v8-to-istanbul "^5.0.1" optionalDependencies: - node-notifier "^7.0.0" + node-notifier "^8.0.0" "@jest/source-map@^25.5.0": version "25.5.0" @@ -1541,16 +1332,16 @@ jest-runner "^25.5.4" jest-runtime "^25.5.4" -"@jest/test-sequencer@^26.4.0": - version "26.4.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.4.0.tgz#f4902772392d478d310dd6fd3b6818fb4bcc4c82" - integrity sha512-9Z7lCShS7vERp+DRwIVNH/6sHMWwJK1DPnGCpGeVLGJJWJ4Y08sQI3vIKdmKHu2KmwlUBpRM+BFf7NlVUkl5XA== +"@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== dependencies: "@jest/test-result" "^26.3.0" graceful-fs "^4.2.4" jest-haste-map "^26.3.0" - jest-runner "^26.4.0" - jest-runtime "^26.4.0" + jest-runner "^26.4.2" + jest-runtime "^26.4.2" "@jest/transform@^25.5.1": version "25.5.1" @@ -1605,16 +1396,6 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@jest/types@^26.1.0": - version "26.1.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.1.0.tgz#f8afaaaeeb23b5cad49dd1f7779689941dcb6057" - integrity sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - "@jest/types@^26.3.0": version "26.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.3.0.tgz#97627bf4bdb72c55346eef98e3b3f7ddc4941f71" @@ -1626,10 +1407,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jsii/spec@^1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.9.0.tgz#6aad644f106f77aa757b005a744d0d17c24a34a5" - integrity sha512-UrRjk4F+HPr3MtttgbxwJ9AG2hhZCjxsPOuqGQl+8iJ7C1nVNLOAbxZKKbQKd8vu6B04Gl1I/9yu2iTiF2Zr5w== +"@jsii/spec@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.11.0.tgz#ab3c33cc06b935d438dca69571f54d9977eee871" + integrity sha512-rRPbq3QGJ0OldafFPfU0vUyjubCe2Scm0xpWEt7EzmY2d8eauCEO9xBJwHSFdnkUFvMFZEgYjF2F856DepAl2Q== dependencies: jsonschema "^1.2.6" @@ -2353,20 +2134,20 @@ fastq "^1.6.0" "@octokit/auth-token@^2.4.0": - version "2.4.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" - integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg== + version "2.4.2" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.2.tgz#10d0ae979b100fa6b72fa0e8e63e27e6d0dbff8a" + integrity sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ== dependencies: - "@octokit/types" "^2.0.0" + "@octokit/types" "^5.0.0" "@octokit/endpoint@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.1.tgz#16d5c0e7a83e3a644d1ddbe8cded6c3d038d31d7" - integrity sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A== + version "6.0.5" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.5.tgz#43a6adee813c5ffd2f719e20cfd14a1fee7c193a" + integrity sha512-70K5u6zd45ItOny6aHQAsea8HHQjlQq85yqOMe+Aj8dkhN2qSJ9T+Q3YjUjEYfPRBcuUWNgMn62DQnP/4LAIiQ== dependencies: - "@octokit/types" "^2.11.1" - is-plain-object "^3.0.0" - universal-user-agent "^5.0.0" + "@octokit/types" "^5.0.0" + is-plain-object "^4.0.0" + universal-user-agent "^6.0.0" "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" @@ -2403,32 +2184,32 @@ once "^1.4.0" "@octokit/request-error@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.0.tgz#94ca7293373654400fbb2995f377f9473e00834b" - integrity sha512-rtYicB4Absc60rUv74Rjpzek84UbVHGHJRu4fNVlZ1mCcyUPPuzFfG9Rn6sjHrd95DEsmjSt1Axlc699ZlbDkw== + version "2.0.2" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.0.2.tgz#0e76b83f5d8fdda1db99027ea5f617c2e6ba9ed0" + integrity sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw== dependencies: - "@octokit/types" "^2.0.0" + "@octokit/types" "^5.0.1" deprecation "^2.0.0" once "^1.4.0" "@octokit/request@^5.2.0": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.2.tgz#74f8e5bbd39dc738a1b127629791f8ad1b3193ee" - integrity sha512-zKdnGuQ2TQ2vFk9VU8awFT4+EYf92Z/v3OlzRaSh4RIP0H6cvW1BFPXq4XYvNez+TPQjqN+0uSkCYnMFFhcFrw== + version "5.4.7" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.4.7.tgz#fd703ee092e0463ceba49ff7a3e61cb4cf8a0fde" + integrity sha512-FN22xUDP0i0uF38YMbOfx6TotpcENP5W8yJM1e/LieGXn6IoRxDMnBf7tx5RKSW4xuUZ/1P04NFZy5iY3Rax1A== dependencies: "@octokit/endpoint" "^6.0.1" "@octokit/request-error" "^2.0.0" - "@octokit/types" "^2.11.1" + "@octokit/types" "^5.0.0" deprecation "^2.0.0" - is-plain-object "^3.0.0" + is-plain-object "^4.0.0" node-fetch "^2.3.0" once "^1.4.0" - universal-user-agent "^5.0.0" + universal-user-agent "^6.0.0" "@octokit/rest@^16.28.4": - version "16.43.1" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.1.tgz#3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b" - integrity sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw== + version "16.43.2" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.2.tgz#c53426f1e1d1044dee967023e3279c50993dd91b" + integrity sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ== dependencies: "@octokit/auth-token" "^2.4.0" "@octokit/plugin-paginate-rest" "^1.1.1" @@ -2447,10 +2228,17 @@ once "^1.4.0" universal-user-agent "^4.0.0" -"@octokit/types@^2.0.0", "@octokit/types@^2.0.1", "@octokit/types@^2.11.1": - version "2.11.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.11.1.tgz#bd5b059596b42845be3f8e66065667aff8c8bf8b" - integrity sha512-QaLoLkmFdfoNbk3eOzPv7vKrUY0nRJIYmZDoz/pTer4ICpqu80aSQTVHnnUxEFuURCiidig76CcxUOYC/bY3RQ== +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": + version "2.16.2" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2" + integrity sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q== + dependencies: + "@types/node" ">= 8" + +"@octokit/types@^5.0.0", "@octokit/types@^5.0.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-5.4.1.tgz#d5d5f2b70ffc0e3f89467c3db749fa87fc3b7031" + integrity sha512-OlMlSySBJoJ6uozkr/i03nO5dlYQyE05vmQNZhAh9MyO4DPBP88QlwsDVLmVjIMFssvIZB6WO0ctIGMRG+xsJQ== dependencies: "@types/node" ">= 8" @@ -3205,9 +2993,9 @@ nullthrows "^1.1.1" "@sinonjs/commons@^1", "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.7.2": - version "1.7.2" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.2.tgz#505f55c74e0272b43f6c52d81946bed7058fc0e2" - integrity sha512-+DUO6pnp3udV/v2VfUWgaY5BIE1IfT7lLfeDzPVeMT1XKkaAp9LgSI9x5RtrFQoZ9Oi0PgXQQHPaoKu7dCjVxw== + version "1.8.1" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" + integrity sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw== dependencies: type-detect "4.0.8" @@ -3226,10 +3014,10 @@ "@sinonjs/commons" "^1" "@sinonjs/samsam" "^5.0.2" -"@sinonjs/samsam@^5.0.2", "@sinonjs/samsam@^5.0.3": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-5.0.3.tgz#86f21bdb3d52480faf0892a480c9906aa5a52938" - integrity sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ== +"@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== dependencies: "@sinonjs/commons" "^1.6.0" lodash.get "^4.4.2" @@ -3247,12 +3035,12 @@ dependencies: "@types/glob" "*" -"@types/aws-lambda@^8.10.39": - version "8.10.50" - resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.50.tgz#fecc12b91cf9c58e98b6cc201b5996a3bb1e7cee" - integrity sha512-RDzmQ5mO1f0BViKiuOudENZmoCACEa461nTRVtxhsAiEqGCgwdhCYN0aFgk42X5+ELAiqJKbv2mK0LkopYRYQg== +"@types/aws-lambda@^8.10.61": + version "8.10.61" + resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.61.tgz#7471e08843dbdcf09b2494ac5b34c4d1a391e6d0" + integrity sha512-+FeZ/52VG4rBSJ0cRE/aB6hMKQzjIgpiSQrGq0eR8ZrXWee7Z2zoGeJzTHVcOeZNawLb+5zvwZNIRGC7X+kQ7Q== -"@types/babel__core@^7.0.0": +"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": version "7.1.9" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.9.tgz#77e59d438522a6fb898fa43dc3455c6e72f3963d" integrity sha512-sY2RsIJ5rpER1u3/aQ8OFSI7qGIy8o1NEEbgb2UaJcvOtXOMpd39ko723NBpjQFg9SIX7TXtjejZVGeIMLhoOw== @@ -3263,17 +3051,6 @@ "@types/babel__template" "*" "@types/babel__traverse" "*" -"@types/babel__core@^7.1.7": - version "7.1.7" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" - integrity sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - "@types/babel__generator@*": version "7.6.1" resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" @@ -3290,9 +3067,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.10" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.10.tgz#d9a99f017317d9b3d1abc2ced45d3bca68df0daf" - integrity sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw== + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.13.tgz#1874914be974a492e1b4cb00585cabb274e8ba18" + integrity sha512-i+zS7t6/s9cdQvbqKDARrcbrPvtJGlbYsMkazo03nTAK3RX9FNrLllXys22uiTGJapPOTZTQ35nHh4ISph4SLQ== dependencies: "@babel/types" "^7.3.0" @@ -3306,13 +3083,6 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@types/fs-extra@^8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.0.tgz#1114834b53c3914806cd03b3304b37b3bd221a4d" - integrity sha512-UoOfVEzAUpeSPmjm7h1uk5MH6KZma2z2O7a75onTGjnNvAvMVrPzPL/vBbT65iIGHWj6rokwfmYcmxmlSf2uwg== - dependencies: - "@types/node" "*" - "@types/fs-extra@^8.1.1": version "8.1.1" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068" @@ -3336,9 +3106,9 @@ "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" - integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" + integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== "@types/istanbul-lib-report@*": version "3.0.0" @@ -3348,9 +3118,9 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" - integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== + 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" "*" @@ -3362,18 +3132,18 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^26.0.4": - version "26.0.4" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.4.tgz#d2e513e85aca16992816f192582b5e67b0b15efb" - integrity sha512-4fQNItvelbNA9+sFgU+fhJo8ZFF+AS4Egk3GWwCW2jFtViukXbnztccafAdLhzE/0EiCogljtQQXP8aQ9J7sFg== +"@types/jest@26.x", "@types/jest@^26.0.10": + version "26.0.10" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.10.tgz#8faf7e9756c033c39014ae76a7329efea00ea607" + integrity sha512-i2m0oyh8w/Lum7wWK/YOZJakYF8Mx08UaKA1CtbmFeDquVhAEdA7znacsVSf2hJ1OQ/OfVMGN90pw/AtzF8s/Q== dependencies: jest-diff "^25.2.1" pretty-format "^25.2.1" "@types/json-schema@^7.0.3": - version "7.0.4" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339" - integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA== + version "7.0.5" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" + integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== "@types/json5@^0.0.29": version "0.0.29" @@ -3387,10 +3157,10 @@ dependencies: jszip "*" -"@types/lodash@^4.14.157": - version "4.14.157" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.157.tgz#fdac1c52448861dfde1a2e1515dbc46e54926dc8" - integrity sha512-Ft5BNFmv2pHDgxV5JDsndOWTRJ+56zte0ZpYLowp03tW+K+t8u8YMOzAnpuqPgzX6WO1XpDIUm7u04M8vdDiVQ== +"@types/lodash@^4.14.160": + version "4.14.160" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.160.tgz#2f1bba6500bc3cb9a732c6d66a083378fb0b0b29" + integrity sha512-aP03BShJoO+WVndoVj/WNcB/YBPt+CIU1mvaao2GRAHy2yg4pT/XS4XnVHEQBjPJGycWf/9seKEO9vopTJGkvA== "@types/md5@^2.2.0": version "2.2.0" @@ -3422,9 +3192,9 @@ integrity sha1-m6It838H43gP/4Ux0aOOYz+UV6U= "@types/node@*", "@types/node@>= 8": - version "13.13.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.0.tgz#30d2d09f623fe32cde9cb582c7a6eda2788ce4a8" - integrity sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A== + version "14.6.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" + integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== "@types/node@^10.17.28": version "10.17.28" @@ -3478,10 +3248,10 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.3.tgz#3ad6ed949e7487e7bda6f886b4a2434a2c3d7b1a" integrity sha512-jQxClWFzv9IXdLdhSaTf16XI3NYe6zrEbckSpb5xhKfPbWgIyAY0AFyWWWfaiDcBuj3UHmMkCIwSRqpKMTZL2Q== -"@types/sinon@^9.0.4": - version "9.0.4" - resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.4.tgz#e934f904606632287a6e7f7ab0ce3f08a0dad4b1" - integrity sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw== +"@types/sinon@^9.0.5": + version "9.0.5" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.5.tgz#56b2a12662dd8c7d081cdc511af5f872cb37377f" + integrity sha512-4CnkGdM/5/FXDGqL32JQ1ttVrGvhOoesLLF7VnTh4KdjK5N5VQOtxaylFqqTjnHx55MnD9O02Nbk5c1ELC8wlQ== dependencies: "@types/sinonjs__fake-timers" "*" @@ -3546,74 +3316,52 @@ resolved "https://registry.yarnpkg.com/@types/yarnpkg__lockfile/-/yarnpkg__lockfile-1.1.3.tgz#38fb31d82ed07dea87df6bd565721d11979fd761" integrity sha512-mhdQq10tYpiNncMkg1vovCud5jQm+rWeRVz6fxjCJlY6uhDlAn9GnMSmBa2DQwqPf/jS5YR0K/xChDEh1jdOQg== -"@typescript-eslint/eslint-plugin@^3.9.1": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.9.1.tgz#8cf27b6227d12d66dd8dc1f1a4b04d1daad51c2e" - integrity sha512-XIr+Mfv7i4paEdBf0JFdIl9/tVxyj+rlilWIfZ97Be0lZ7hPvUbS5iHt9Glc8kRI53dsr0PcAEudbf8rO2wGgg== +"@typescript-eslint/eslint-plugin@^3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz#7e061338a1383f59edc204c605899f93dc2e2c8f" + integrity sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ== dependencies: - "@typescript-eslint/experimental-utils" "3.9.1" + "@typescript-eslint/experimental-utils" "3.10.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.28.0": - version "2.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz#1fd0961cd8ef6522687b4c562647da6e71f8833d" - integrity sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.28.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - -"@typescript-eslint/experimental-utils@3.9.1": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.9.1.tgz#b140b2dc7a7554a44f8a86fb6fe7cbfe57ca059e" - integrity sha512-lkiZ8iBBaYoyEKhCkkw4SAeatXyBq9Ece5bZXdLe1LWBUwTszGbmbiqmQbwWA8cSYDnjWXp9eDbXpf9Sn0hLAg== +"@typescript-eslint/experimental-utils@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz#e179ffc81a80ebcae2ea04e0332f8b251345a686" + integrity sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/types" "3.9.1" - "@typescript-eslint/typescript-estree" "3.9.1" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^2.19.2": - version "2.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.28.0.tgz#bb761286efd2b0714761cab9d0ee5847cf080385" - integrity sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw== +"@typescript-eslint/parser@^3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.1.tgz#1883858e83e8b442627e1ac6f408925211155467" + integrity sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.28.0" - "@typescript-eslint/typescript-estree" "2.28.0" + "@typescript-eslint/experimental-utils" "3.10.1" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/typescript-estree" "3.10.1" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/types@3.9.1": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.9.1.tgz#b2a6eaac843cf2f2777b3f2464fb1fbce5111416" - integrity sha512-15JcTlNQE1BsYy5NBhctnEhEoctjXOjOK+Q+rk8ugC+WXU9rAcS2BYhoh6X4rOaXJEpIYDl+p7ix+A5U0BqPTw== - -"@typescript-eslint/typescript-estree@2.28.0": - version "2.28.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz#d34949099ff81092c36dc275b6a1ea580729ba00" - integrity sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q== - dependencies: - debug "^4.1.1" - eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^6.3.0" - tsutils "^3.17.1" +"@typescript-eslint/types@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727" + integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ== -"@typescript-eslint/typescript-estree@3.9.1": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.9.1.tgz#fd81cada74bc8a7f3a2345b00897acb087935779" - integrity sha512-IqM0gfGxOmIKPhiHW/iyAEXwSVqMmR2wJ9uXHNdFpqVvPaQ3dWg302vW127sBpAiqM9SfHhyS40NKLsoMpN2KA== +"@typescript-eslint/typescript-estree@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz#fd0061cc38add4fad45136d654408569f365b853" + integrity sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w== dependencies: - "@typescript-eslint/types" "3.9.1" - "@typescript-eslint/visitor-keys" "3.9.1" + "@typescript-eslint/types" "3.10.1" + "@typescript-eslint/visitor-keys" "3.10.1" debug "^4.1.1" glob "^7.1.6" is-glob "^4.0.1" @@ -3621,10 +3369,10 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@3.9.1": - version "3.9.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.9.1.tgz#92af3747cdb71509199a8f7a4f00b41d636551d1" - integrity sha512-zxdtUjeoSh+prCpogswMwVUJfEFmCOjdzK9rpNjNBfm6EyPt99x3RrJoBOGZO23FCt0WPKUCOL5mb/9D5LjdwQ== +"@typescript-eslint/visitor-keys@3.10.1": + version "3.10.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz#cd4274773e3eb63b2e870ac602274487ecd1e931" + integrity sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ== dependencies: eslint-visitor-keys "^1.1.0" @@ -3650,12 +3398,7 @@ JSONStream@^1.0.4, JSONStream@^1.3.4: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" - integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== - -abab@^2.0.3: +abab@^2.0.0, abab@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.4.tgz#6dfa57b417ca06d21b2478f0e638302f99c2405c" integrity sha512-Eu9ELJWCz/c1e9gTiCY+FceWxcqzjYEbqMgtndnuSqZSUCOL73TWNK2mHfIj4Cw2E/ongOp+JISVNCmovt2KYQ== @@ -3707,9 +3450,9 @@ acorn@^6.0.1, acorn@^6.0.4: integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== acorn@^7.1.0, acorn@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" - integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + version "7.4.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" + integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== add-stream@^1.0.0: version "1.0.0" @@ -3738,17 +3481,17 @@ agentkeepalive@^3.4.1: humanize-ms "^1.2.1" aggregate-error@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" - integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" - integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3: + version "6.12.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" + integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -3843,6 +3586,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +app-root-path@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a" + integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA== + append-transform@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" @@ -4000,11 +3748,6 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -4048,9 +3791,11 @@ assign-symbols@^1.0.0: integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= ast-types@0.x.x: - version "0.13.3" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.3.tgz#50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7" - integrity sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA== + version "0.14.1" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.1.tgz#0b415043770d7a2cbe4b2770271cbd7d2c9f61b9" + integrity sha512-pfSiukbt23P1qMhNnsozLzhMLBs7EEeXqPyvPmnuZM+RMfwfqwDbSVKYflgGuVI7/VehR4oMks0igzdNAg4VeQ== + dependencies: + tslib "^2.0.1" astral-regex@^1.0.0: version "1.0.0" @@ -4099,7 +3844,7 @@ available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2: dependencies: array-filter "^1.0.0" -aws-sdk-mock@^5.1.0: +aws-sdk-mock@^5.0.0, aws-sdk-mock@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/aws-sdk-mock/-/aws-sdk-mock-5.1.0.tgz#6f2c0bd670d7f378c906a8dd806f812124db71aa" integrity sha512-Wa5eCSo8HX0Snqb7FdBylaXMmfrAWoWZ+d7MFhiYsgHPvNvMEGjV945FF2qqE1U0Tolr1ALzik1fcwgaOhqUWQ== @@ -4108,10 +3853,10 @@ aws-sdk-mock@^5.1.0: sinon "^9.0.1" traverse "^0.6.6" -aws-sdk@^2.637.0, aws-sdk@^2.736.0: - version "2.736.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.736.0.tgz#7b9373d1a338288c5caeca01a6226efbade2e086" - integrity sha512-rDrLgxkiFX+9EksDx4Lc6qLA07Pf0xfqqXnM3CpLBL81aVOdmmXAiBPtz/KSgbcrR5Mxz38ah8x5RZ17stJQjw== +aws-sdk@^2.596.0, aws-sdk@^2.637.0, aws-sdk@^2.739.0: + version "2.739.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.739.0.tgz#10b0b29be18c3f0f85ca145cbed8b10793ddc7a7" + integrity sha512-N2XyxY12gs0GJc26O8TmdT30ovEKWsPX787CNW24g0cXTCyc/Teltq0re6yGxfaH0VmN6qONNLr3E59JtJ3neA== dependencies: buffer "4.9.2" events "1.1.1" @@ -4129,9 +3874,9 @@ aws-sign2@~0.7.0: integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" - integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== + version "1.10.1" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" + integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== axios@^0.19.0: version "0.19.2" @@ -4205,23 +3950,7 @@ babel-plugin-jest-hoist@^26.2.0: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.2.tgz#fb4a4c51fe38ca60fede1dc74ab35eb843cb41d6" - integrity sha512-u/8cS+dEiK1SFILbOC8/rUI3ml9lboKuuMvZ/4aQnQmhecQAgPw5ew066C1ObnEAUmlx7dv/s2z52psWEtLNiw== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -babel-preset-current-node-syntax@^0.1.3: +babel-preset-current-node-syntax@^0.1.2, 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== @@ -4314,9 +4043,9 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== bn.js@^5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.2.tgz#c9686902d3c9a27729f43ab10f9d79c2004da7b0" - integrity sha512-40rZaf3bUNKTVYu9sIeeEGOg7g14Yvnj9kH7b50EiwX0Q7A6umbvfI5tvHaOERH0XigqKkfLkFQxzb4e6CIXnA== + version "5.1.3" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.1.3.tgz#beca005408f642ebebea80b042b4d18d2ac0ee6b" + integrity sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== boolbase@^1.0.0, boolbase@~1.0.0: version "1.0.0" @@ -4665,9 +4394,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001111: - version "1.0.30001113" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001113.tgz#22016ab55b5a8b04fa00ca342d9ee1b98df48065" - integrity sha512-qMvjHiKH21zzM/VDZr6oosO6Ri3U0V2tC015jRXjOecwQCJtsU5zklTNTk31jQbIOP8gha0h1ccM/g0ECP+4BA== + version "1.0.30001117" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001117.tgz#69a9fae5d480eaa9589f7641a83842ad396d17c4" + integrity sha512-4tY0Fatzdx59kYjQs+bNxUwZB03ZEBgVmJ1UkFPz/Q8OLiUUbjct2EdpnXj0fvFTPej2EkbPIG0w8BWsjAyk1Q== capture-exit@^2.0.0: version "2.0.0" @@ -4737,7 +4466,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -charenc@~0.0.1: +charenc@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc= @@ -4813,7 +4542,7 @@ cli-spinners@^2.2.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== -cli-truncate@2.1.0, cli-truncate@^2.1.0: +cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== @@ -4826,6 +4555,11 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -4891,10 +4625,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemaker@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.9.0.tgz#0c4a56b15be0dc4748429cfb8a587d70efb0a831" - integrity sha512-RQCMZB5TputppZELnV7NQRgFStOLTBcfKlXbgwwuVjSieZnKR/zrXnjqouLRQyeuUIC/9BIcRYNh3biHd4iS1Q== +codemaker@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/codemaker/-/codemaker-1.11.0.tgz#4b63b5a04e1566b58fdd80583c383c061f2a8ce1" + integrity sha512-cBTHf17J9ukOqwmPFfU7VTqBsl/WLIHh2LQk4mTA8GQgeBSD9E5u52nqHCB3Ca5PY8vBol5ifgtuukJkHqlgqQ== dependencies: camelcase "^6.0.0" decamelize "^4.0.0" @@ -4988,16 +4722,21 @@ command-exists@^1.2.6: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.19.0, commander@^2.20.0, commander@~2.20.3: +commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^5.0.0, commander@^5.1.0: +commander@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== +commander@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.0.0.tgz#2b270da94f8fb9014455312f829a1129dbf8887e" + integrity sha512-s7EA+hDtTYNhuXkTlhqew4txMZVdszBmKWSPEMxGr8ru8JXR7bLUFIAtPhcSuFdJQ0ILMxnJi8GkQL0yvDy/YA== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -5013,13 +4752,13 @@ commonmark@^0.29.1: minimist "~1.2.0" string.prototype.repeat "^0.2.0" -compare-func@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" - integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= +compare-func@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" + integrity sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA== dependencies: array-ify "^1.0.0" - dot-prop "^3.0.0" + dot-prop "^5.1.0" component-emitter@^1.2.1: version "1.3.0" @@ -5094,30 +4833,22 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -constructs@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.0.2.tgz#49432ba2ef765445bddd5fcc5b3948903ec5210b" - integrity sha512-Q4SkOFaRH2D65kvcGrDZ/FgJwk59HwUohbdCbeIueas+8RJhd9N4j6QgvHnMfTOmQWDPXCn1IGwteTLC0OK1NA== +constructs@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.0.4.tgz#eb1ed5b80f6600b8d50de83971357ae0fe8e29a2" + integrity sha512-CDvg7gMjphE3DFX4pzkF6j73NREbR8npPFW8Mx/CLRnMR035+Y1o1HrXIsNSss/dq3ZUnNTU9jKyd3fL9EOlfw== contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -conventional-changelog-angular@^5.0.10: - version "5.0.10" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.10.tgz#5cf7b00dd315b6a6a558223c80d5ef24ddb34205" - integrity sha512-k7RPPRs0vp8+BtPsM9uDxRl6KcgqtCJmzRD1wRtgqmhQ96g8ifBGo9O/TZBG23jqlXS/rg8BKRDELxfnQQGiaA== +conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.3: + version "5.0.11" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.11.tgz#99a3ca16e4a5305e0c2c2fae3ef74fd7631fc3fb" + integrity sha512-nSLypht/1yEflhuTogC03i7DX7sOrXGsRn14g131Potqi6cbGbGEE9PSDEHKldabB6N76HiSyw9Ph+kLmC04Qw== dependencies: - compare-func "^1.3.1" - q "^1.5.1" - -conventional-changelog-angular@^5.0.3: - version "5.0.6" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz#269540c624553aded809c29a3508fdc2b544c059" - integrity sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA== - dependencies: - compare-func "^1.3.1" + compare-func "^2.0.0" q "^1.5.1" conventional-changelog-atom@^2.0.7: @@ -5127,13 +4858,13 @@ conventional-changelog-atom@^2.0.7: dependencies: q "^1.5.1" -conventional-changelog-cli@^2.0.34: - version "2.0.34" - resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-2.0.34.tgz#3d9da6011aaaf24f331b606ddc5087a6b811464b" - integrity sha512-HDDIhhpsMKiiAfH/mbj7wApgN7uA33Nk4hISY3/7ijlfqXc/bmP3v4o3Yialoxz0iTBibc94xi6kfTH7XIvwDw== +conventional-changelog-cli@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-2.1.0.tgz#5da5be32203ca8382815afc85b7f9151115d5e97" + integrity sha512-hZ8EcpxV4LcGOZwH+U5LJQDnyA4o/uyUdmIGzmFZMB4caujavvDBo/iTgVihk0m1QKkEhJgulagrILSm1JCakA== dependencies: add-stream "^1.0.0" - conventional-changelog "^3.1.21" + conventional-changelog "^3.1.23" lodash "^4.17.15" meow "^7.0.0" tempfile "^3.0.0" @@ -5150,12 +4881,12 @@ conventional-changelog-config-spec@2.1.0: resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== -conventional-changelog-conventionalcommits@4.3.0, conventional-changelog-conventionalcommits@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.3.0.tgz#c4205a659f7ca9d7881f29ee78a4e7d6aeb8b3c2" - integrity sha512-oYHydvZKU+bS8LnGqTMlNrrd7769EsuEHKy4fh1oMdvvDi7fem8U+nvfresJ1IDB8K00Mn4LpiA/lR+7Gs6rgg== +conventional-changelog-conventionalcommits@4.4.0, conventional-changelog-conventionalcommits@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.4.0.tgz#8d96687141c9bbd725a89b95c04966d364194cd4" + integrity sha512-ybvx76jTh08tpaYrYn/yd0uJNLt5yMrb1BphDe4WBredMlvPisvMghfpnJb6RmRNcqXeuhR6LfGZGewbkRm9yA== dependencies: - compare-func "^1.3.1" + compare-func "^2.0.0" lodash "^4.17.15" q "^1.5.1" @@ -5178,19 +4909,19 @@ conventional-changelog-core@^3.1.6: read-pkg-up "^3.0.0" through2 "^3.0.0" -conventional-changelog-core@^4.1.7: - version "4.1.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.1.7.tgz#6b5cdadda4430895cc4a75a73dd8b36e322ab346" - integrity sha512-UBvSrQR2RdKbSQKh7RhueiiY4ZAIOW3+CSWdtKOwRv+KxIMNFKm1rOcGBFx0eA8AKhGkkmmacoTWJTqyz7Q0VA== +conventional-changelog-core@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.0.tgz#d8befd1e1f5126bf35a17668276cc8c244650469" + integrity sha512-8+xMvN6JvdDtPbGBqA7oRNyZD4od1h/SIzrWqHcKZjitbVXrFpozEeyn4iI4af1UwdrabQpiZMaV07fPUTGd4w== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^4.0.16" + conventional-changelog-writer "^4.0.17" conventional-commits-parser "^3.1.0" dateformat "^3.0.0" get-pkg-repo "^1.0.0" git-raw-commits "2.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^4.0.0" + git-semver-tags "^4.1.0" lodash "^4.17.15" normalize-package-data "^2.3.5" q "^1.5.1" @@ -5227,30 +4958,25 @@ conventional-changelog-jquery@^3.0.10: dependencies: q "^1.5.1" -conventional-changelog-jshint@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.7.tgz#955a69266951cd31e8afeb3f1c55e0517fdca943" - integrity sha512-qHA8rmwUnLiIxANJbz650+NVzqDIwNtc0TcpIa0+uekbmKHttidvQ1dGximU3vEDdoJVKFgR3TXFqYuZmYy9ZQ== +conventional-changelog-jshint@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.8.tgz#3fff4df8cb46037f77b9dc3f8e354c7f99332f13" + integrity sha512-hB/iI0IiZwnZ+seYI+qEQ4b+EMQSEC8jGIvhO2Vpz1E5p8FgLz75OX8oB1xJWl+s4xBMB6f8zJr0tC/BL7YOjw== dependencies: - compare-func "^1.3.1" + compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-preset-loader@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz#580fa8ab02cef22c24294d25e52d7ccd247a9a6a" - integrity sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ== - -conventional-changelog-preset-loader@^2.3.4: +conventional-changelog-preset-loader@^2.1.1, conventional-changelog-preset-loader@^2.3.4: version "2.3.4" resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== -conventional-changelog-writer@^4.0.16: - version "4.0.16" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.16.tgz#ca10f2691a8ea6d3c2eb74bd35bcf40aa052dda5" - integrity sha512-jmU1sDJDZpm/dkuFxBeRXvyNcJQeKhGtVcFFkwTphUAzyYWcwz2j36Wcv+Mv2hU3tpvLMkysOPXJTLO55AUrYQ== +conventional-changelog-writer@^4.0.17, conventional-changelog-writer@^4.0.6: + version "4.0.17" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.17.tgz#4753aaa138bf5aa59c0b274cb5937efcd2722e21" + integrity sha512-IKQuK3bib/n032KWaSb8YlBFds+aLmzENtnKtxJy3+HqDq5kohu3g/UdNbIHeJWygfnEbZjnCKFxAW0y7ArZAw== dependencies: - compare-func "^1.3.1" + compare-func "^2.0.0" conventional-commits-filter "^2.0.6" dateformat "^3.0.0" handlebars "^4.7.6" @@ -5261,48 +4987,24 @@ conventional-changelog-writer@^4.0.16: split "^1.0.0" through2 "^3.0.0" -conventional-changelog-writer@^4.0.6: - version "4.0.11" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz#9f56d2122d20c96eb48baae0bf1deffaed1edba4" - integrity sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw== - dependencies: - compare-func "^1.3.1" - conventional-commits-filter "^2.0.2" - dateformat "^3.0.0" - handlebars "^4.4.0" - json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^5.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^3.0.0" - -conventional-changelog@3.1.21, conventional-changelog@^3.1.21: - version "3.1.21" - resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.21.tgz#4a774e6bf503acfd7e4685bb750da8c0eccf1e0d" - integrity sha512-ZGecVZPEo3aC75VVE4nu85589dDhpMyqfqgUM5Myq6wfKWiNqhDJLSDMsc8qKXshZoY7dqs1hR0H/15kI/G2jQ== +conventional-changelog@3.1.23, conventional-changelog@^3.1.23: + version "3.1.23" + resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.23.tgz#d696408021b579a3814aba79b38729ed86478aea" + integrity sha512-sScUu2NHusjRC1dPc5p8/b3kT78OYr95/Bx7Vl8CPB8tF2mG1xei5iylDTRjONV5hTlzt+Cn/tBWrKdd299b7A== dependencies: - conventional-changelog-angular "^5.0.10" + conventional-changelog-angular "^5.0.11" conventional-changelog-atom "^2.0.7" conventional-changelog-codemirror "^2.0.7" - conventional-changelog-conventionalcommits "^4.3.0" - conventional-changelog-core "^4.1.7" + conventional-changelog-conventionalcommits "^4.4.0" + conventional-changelog-core "^4.2.0" conventional-changelog-ember "^2.0.8" conventional-changelog-eslint "^3.0.8" conventional-changelog-express "^2.0.5" conventional-changelog-jquery "^3.0.10" - conventional-changelog-jshint "^2.0.7" + conventional-changelog-jshint "^2.0.8" conventional-changelog-preset-loader "^2.3.4" -conventional-commits-filter@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz#f122f89fbcd5bb81e2af2fcac0254d062d1039c1" - integrity sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ== - dependencies: - lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-filter@^2.0.6: +conventional-commits-filter@^2.0.2, conventional-commits-filter@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.6.tgz#0935e1240c5ca7698329affee1b6a46d33324c4c" integrity sha512-4g+sw8+KA50/Qwzfr0hL5k5NWxqtrOVw4DDk3/h6L85a9Gz0/Eqp3oP+CWCNfesBvZZZEFHF7OTEbRe+yYSyKw== @@ -5310,20 +5012,7 @@ conventional-commits-filter@^2.0.6: lodash.ismatch "^4.4.0" modify-values "^1.0.0" -conventional-commits-parser@^3.0.3: - version "3.0.8" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz#23310a9bda6c93c874224375e72b09fb275fe710" - integrity sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^5.0.0" - split2 "^2.0.0" - through2 "^3.0.0" - trim-off-newlines "^1.0.0" - -conventional-commits-parser@^3.1.0: +conventional-commits-parser@^3.0.3, conventional-commits-parser@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.1.0.tgz#10140673d5e7ef5572633791456c5d03b69e8be4" integrity sha512-RSo5S0WIwXZiRxUGTPuYFbqvrR4vpJ1BDdTlthFgvHt5kEdnd1+pdvwWphWn57/oIl4V72NMmOocFqqJ8mFFhA== @@ -5336,17 +5025,17 @@ conventional-commits-parser@^3.1.0: through2 "^3.0.0" trim-off-newlines "^1.0.0" -conventional-recommended-bump@6.0.9: - version "6.0.9" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.9.tgz#49ee74f52fbafcc63e89e2297d020279fea318f0" - integrity sha512-DpRmW1k8CpRrcsXHOPGgHgOd4BMGiq2gtXAveGM8B9pSd9b4r4WKnqp1Fd0vkDtk8l973mIk8KKKUYnKRr9SFw== +conventional-recommended-bump@6.0.10: + version "6.0.10" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.0.10.tgz#ac2fb3e31bad2aeda80086b345bf0c52edd1d1b3" + integrity sha512-2ibrqAFMN3ZA369JgVoSbajdD/BHN6zjY7DZFKTHzyzuQejDUCjQ85S5KHxCRxNwsbDJhTPD5hOKcis/jQhRgg== dependencies: concat-stream "^2.0.0" conventional-changelog-preset-loader "^2.3.4" conventional-commits-filter "^2.0.6" conventional-commits-parser "^3.1.0" git-raw-commits "2.0.0" - git-semver-tags "^4.0.0" + git-semver-tags "^4.1.0" meow "^7.0.0" q "^1.5.1" @@ -5416,27 +5105,27 @@ cosmiconfig@^5.0.0, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cosmiconfig@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" - integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== +cosmiconfig@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" + integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== dependencies: "@types/parse-json" "^4.0.0" - import-fresh "^3.1.0" + import-fresh "^3.2.1" parse-json "^5.0.0" path-type "^4.0.0" - yaml "^1.7.2" + yaml "^1.10.0" coveralls@^3.0.2: - version "3.0.11" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.11.tgz#e141da0922b632fcc66620f334460c3f0026a4ce" - integrity sha512-LZPWPR2NyGKyaABnc49dR0fpeP6UqhvGq4B5nUrTQ1UBy55z96+ga7r+/ChMdMJUwBgyJDXBi88UBgz2rs9IiQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b" + integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ== dependencies: js-yaml "^3.13.1" lcov-parse "^1.0.0" log-driver "^1.2.7" minimist "^1.2.5" - request "^2.88.0" + request "^2.88.2" cp-file@^6.2.0: version "6.2.0" @@ -5515,15 +5204,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5: which "^1.2.9" cross-spawn@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" - integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -crypt@~0.0.1: +crypt@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= @@ -5711,14 +5400,7 @@ cssstyle@^1.1.1: dependencies: cssom "0.3.x" -cssstyle@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.2.0.tgz#e4c44debccd6b7911ed617a4395e5754bba59992" - integrity sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA== - dependencies: - cssom "~0.3.6" - -cssstyle@^2.2.0: +cssstyle@^2.0.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== @@ -6115,21 +5797,14 @@ domutils@^1.5.1, domutils@^1.7.0: dom-serializer "0" domelementtype "1" -dot-prop@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" - integrity sha1-G3CK8JSknJoOfbyteQq6U52sEXc= - dependencies: - is-obj "^1.0.0" - dot-prop@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== dependencies: is-obj "^1.0.0" -dot-prop@^5.2.0: +dot-prop@^5.1.0, dot-prop@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.2.0.tgz#c34ecc29556dc45f1f4c22697b6f4904e0cc4fcb" integrity sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A== @@ -6141,11 +5816,21 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-json@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dotenv-json/-/dotenv-json-1.0.0.tgz#fc7f672aafea04bed33818733b9f94662332815c" + integrity sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ== + dotenv@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@^8.0.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + dotgitignore@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/dotgitignore/-/dotgitignore-2.1.0.tgz#a4b15a4e4ef3cf383598aaf1dfa4a04bcc089b7b" @@ -6162,9 +5847,9 @@ dreamopt@~0.6.0: wordwrap ">=0.0.2" duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" @@ -6195,9 +5880,9 @@ ejs@^2.5.2, ejs@^2.6.1: integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== electron-to-chromium@^1.3.523: - version "1.3.530" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.530.tgz#9b1033f5221cece94eeb3ec98db27227177fd196" - integrity sha512-jnKBqvkXyxo6Tr245YyghzSMjmrA+uzQn+rwLjd3n+Y3sad0eWPzAXfa2lDwSikQu0I5reYacZjmQjCRH9VQdg== + version "1.3.545" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.545.tgz#d9add694c78554b8c00bc6e6fc929d5ccd7d1b99" + integrity sha512-+0R/i17u5E1cwF3g0W8Niq3UUKTUMyyT4kLkutZUHG8mDNvFsAckK3HIanzGVtixe3b6rknD8k7gHiR6nKFkgg== elliptic@^6.5.3: version "6.5.3" @@ -6242,11 +5927,11 @@ encodeurl@~1.0.2: integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== dependencies: - iconv-lite "~0.4.13" + iconv-lite "^0.6.2" end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" @@ -6255,7 +5940,7 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enquirer@^2.3.5: +enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -6278,9 +5963,9 @@ env-paths@^2.2.0: integrity sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA== envinfo@^7.3.1: - version "7.5.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.5.0.tgz#91410bb6db262fb4f1409bd506e9ff57e91023f4" - integrity sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ== + version "7.7.3" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.3.tgz#4b2d8622e3e7366afb8091b23ed95569ea0208cc" + integrity sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA== err-code@^1.0.0: version "1.1.2" @@ -6294,35 +5979,36 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.4, es-abstract@^1.17.5: - version "1.17.5" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" - integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== +es-abstract@^1.17.0, es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.17.5: + version "1.17.6" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" + integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" + is-callable "^1.2.0" + is-regex "^1.1.0" object-inspect "^1.7.0" object-keys "^1.1.1" object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" -es-abstract@^1.17.2: - version "1.17.6" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.6.tgz#9142071707857b2cacc7b89ecb670316c3e2d52a" - integrity sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== +es-abstract@^1.18.0-next.0: + version "1.18.0-next.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.0.tgz#b302834927e624d8e5837ed48224291f2c66e6fc" + integrity sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ== dependencies: es-to-primitive "^1.2.1" function-bind "^1.1.1" has "^1.0.3" has-symbols "^1.0.1" is-callable "^1.2.0" - is-regex "^1.1.0" - object-inspect "^1.7.0" + is-negative-zero "^2.0.0" + is-regex "^1.1.1" + object-inspect "^1.8.0" object-keys "^1.1.1" object.assign "^4.1.0" string.prototype.trimend "^1.0.1" @@ -6402,19 +6088,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.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.1.tgz#ba01d0c8278b5e95a9a45350142026659027a457" - integrity sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ== - dependencies: - esprima "^4.0.1" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -escodegen@^1.11.0, escodegen@^1.14.1: +escodegen@1.x.x, escodegen@^1.11.0, escodegen@^1.11.1, 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== @@ -6426,15 +6100,12 @@ escodegen@^1.11.0, escodegen@^1.14.1: optionalDependencies: source-map "~0.6.1" -eslint-import-resolver-node@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.3.tgz#dbaa52b6b2816b50bc6711af75422de808e98404" - integrity sha512-b8crLDo0M5RSe5YG8Pu2DYBj71tSB6OvXkfzwbJU2w7y8P4/yo0MyF8jU26IEuEuHF2K5/gcAJE3LhQGqBBbVg== - dependencies: - debug "^2.6.9" - resolve "^1.13.1" +eslint-config-standard@^14.1.0: + version "14.1.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" + integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== -eslint-import-resolver-node@^0.3.4: +eslint-import-resolver-node@^0.3.3, eslint-import-resolver-node@^0.3.4: version "0.3.4" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== @@ -6442,15 +6113,15 @@ eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" -eslint-import-resolver-typescript@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.0.0.tgz#e95f126cc12d3018b9cc11692b4dbfd3e17d3ea6" - integrity sha512-bT5Frpl8UWoHBtY25vKUOMoVIMlJQOMefHLyQ4Tz3MQpIZ2N6yYKEEIHMo38bszBNUuMBW6M3+5JNYxeiGFH4w== +eslint-import-resolver-typescript@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.2.1.tgz#4b9bdfb51af7e14947ebc40ffdd6c32d5924b905" + integrity sha512-wxlVdwuWY6R5+CoesIy6n8EZX4k9lEeZGWTVBoX9g//8Xma8JMtL/p3AGnG43rRyXmIrX+/0IN8lpOPzrw1fSw== dependencies: debug "^4.1.1" + glob "^7.1.6" is-glob "^4.0.1" - resolve "^1.12.0" - tiny-glob "^0.2.6" + resolve "^1.17.0" tsconfig-paths "^3.9.0" eslint-module-utils@^2.6.0: @@ -6461,7 +6132,15 @@ eslint-module-utils@^2.6.0: debug "^2.6.9" pkg-dir "^2.0.0" -eslint-plugin-import@^2.22.0: +eslint-plugin-es@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976" + integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ== + dependencies: + eslint-utils "^1.4.2" + regexpp "^3.0.0" + +eslint-plugin-import@^2.19.1, eslint-plugin-import@^2.22.0: version "2.22.0" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz#92f7736fe1fde3e2de77623c838dd992ff5ffb7e" integrity sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg== @@ -6480,15 +6159,37 @@ eslint-plugin-import@^2.22.0: resolve "^1.17.0" tsconfig-paths "^3.9.0" +eslint-plugin-node@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6" + integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ== + dependencies: + eslint-plugin-es "^2.0.0" + eslint-utils "^1.4.2" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a" + integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== + +eslint-plugin-standard@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4" + integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ== + eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5" + integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.4.3: +eslint-utils@^1.4.2, eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== @@ -6496,16 +6197,16 @@ eslint-utils@^1.4.3: eslint-visitor-keys "^1.1.0" eslint-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" - integrity sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA== + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== dependencies: eslint-visitor-keys "^1.1.0" eslint-visitor-keys@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" - integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== eslint@^6.8.0: version "6.8.0" @@ -6594,9 +6295,9 @@ estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" - integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== esutils@^2.0.2: version "2.0.3" @@ -6609,9 +6310,9 @@ eventemitter3@^3.1.0: integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== eventemitter3@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + version "4.0.5" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.5.tgz#51d81e4f1ccc8311a04f0c20121ea824377ea6d9" + integrity sha512-QR0rh0YiPuxuDQ6+T9GAO/xWTExXpxIes1Nl9RykNGTnE1HJmkuEfxJH9cubjIOQZ/GH4qNBR4u8VSHaKiWs4g== events-to-array@^1.0.1: version "1.1.2" @@ -6670,7 +6371,7 @@ execa@^3.2.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^4.0.0, execa@^4.0.1: +execa@^4.0.0, execa@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/execa/-/execa-4.0.3.tgz#0a34dabbad6d66100bd6f2c576c8669403f317f2" integrity sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A== @@ -6715,15 +6416,15 @@ expect@^25.5.0: jest-message-util "^25.5.0" jest-regex-util "^25.2.6" -expect@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.4.0.tgz#34a0aae523343b0931ff1cf0aa972dfe40edfab4" - integrity sha512-dbYDJhFcqQsamlos6nEwAMe+ahdckJBk5fmw1DYGLQGabGSlUuT+Fm2jHYw5119zG3uIhP+lCQbjJhFEdZMJtg== +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" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.4.0" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" jest-regex-util "^26.0.0" @@ -6793,12 +6494,7 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= -fast-deep-equal@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" - integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== - -fast-deep-equal@^3.1.3: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -7091,9 +6787,9 @@ from2@^2.1.0: readable-stream "^2.0.0" fromentries@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.0.tgz#e6aa06f240d6267f913cea422075ef88b63e7897" - integrity sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ== + version "1.2.1" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.2.1.tgz#64c31665630479bc993cd800d53387920dc61b4d" + integrity sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw== fs-access@^1.0.1: version "1.0.1" @@ -7154,9 +6850,9 @@ fs.realpath@^1.0.0: integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== ftp@~0.3.10: version "0.3.10" @@ -7254,9 +6950,9 @@ get-stream@^4.0.0, get-stream@^4.1.0: pump "^3.0.0" get-stream@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" - integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== dependencies: pump "^3.0.0" @@ -7311,26 +7007,26 @@ git-semver-tags@^2.0.3: meow "^4.0.0" semver "^6.0.0" -git-semver-tags@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.0.0.tgz#a9dd58a0dd3561a4a9898b7e9731cf441c98fc38" - integrity sha512-LajaAWLYVBff+1NVircURJFL8TQ3EMIcLAfHisWYX/nPoMwnTYfWAznQDmMujlLqoD12VtLmoSrF1sQ5MhimEQ== +git-semver-tags@^4.0.0, git-semver-tags@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.0.tgz#0146c9bc24ee96104c99f443071c8c2d7dc848e3" + integrity sha512-TcxAGeo03HdErzKzi4fDD+xEL7gi8r2Y5YSxH6N2XYdVSV5UkBwfrt7Gqo1b+uSHCjy/sa9Y6BBBxxFLxfbhTg== dependencies: meow "^7.0.0" semver "^6.0.0" git-up@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.1.tgz#cb2ef086653640e721d2042fe3104857d89007c0" - integrity sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.2.tgz#10c3d731051b366dc19d3df454bfca3f77913a7c" + integrity sha512-kbuvus1dWQB2sSW4cbfTeGpCMd8ge9jx9RKnhXhuJ7tnvT+NIrTVfYZxjtflZddQYcmdOTlkAcjmx7bor+15AQ== dependencies: is-ssh "^1.3.0" parse-url "^5.0.0" git-url-parse@^11.1.2: - version "11.1.2" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.2.tgz#aff1a897c36cc93699270587bea3dbcbbb95de67" - integrity sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ== + version "11.1.3" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.1.3.tgz#03625b6fc09905e9ad1da7bb2b84be1bf9123143" + integrity sha512-GPsfwticcu52WQ+eHp0IYkAyaOASgYdtsQDIt4rUp6GbiNt1P9ddrh3O0kQB0eD4UJZszVqNT3+9Zwcg40fywA== dependencies: git-up "^4.0.0" @@ -7395,11 +7091,6 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globalyzer@^0.1.0: - version "0.1.4" - resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.4.tgz#bc8e273afe1ac7c24eea8def5b802340c5cc534f" - integrity sha512-LeguVWaxgHN0MNbWC6YljNMzHkrCny9fzjmEUdnF1kQ7wATFD1RHFRqA1qxaX2tgxGENlcxjOflopBwj3YZiXA== - globby@^9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" @@ -7414,17 +7105,7 @@ globby@^9.2.0: pify "^4.0.1" slash "^2.0.0" -globrex@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" - integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== - -graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -7434,7 +7115,7 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.4.0, handlebars@^4.7.6: +handlebars@^4.7.6: version "4.7.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== @@ -7452,11 +7133,11 @@ har-schema@^2.0.0: integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== dependencies: - ajv "^6.5.5" + ajv "^6.12.3" har-schema "^2.0.0" hard-rejection@^2.1.0: @@ -7745,13 +7426,20 @@ humanize-ms@^1.2.1: dependencies: ms "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" + integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -7784,6 +7472,11 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.1: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -7797,7 +7490,7 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" -import-fresh@^3.0.0, import-fresh@^3.1.0: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== @@ -7905,28 +7598,28 @@ inquirer@^6.2.0: through "^2.3.6" inquirer@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" - integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== dependencies: ansi-escapes "^4.2.1" - chalk "^3.0.0" + chalk "^4.1.0" cli-cursor "^3.1.0" - cli-width "^2.0.0" + cli-width "^3.0.0" external-editor "^3.0.3" figures "^3.0.0" - lodash "^4.17.15" + lodash "^4.17.19" mute-stream "0.0.8" run-async "^2.4.0" - rxjs "^6.5.3" + rxjs "^6.6.0" string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" interpret@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" @@ -7999,17 +7692,12 @@ is-boolean-object@^1.0.0: resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e" integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ== -is-buffer@^1.1.5, is-buffer@~1.1.1: +is-buffer@^1.1.5, is-buffer@~1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== - -is-callable@^1.2.0: +is-callable@^1.1.4, is-callable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== @@ -8167,6 +7855,11 @@ is-nan@^1.2.1: dependencies: define-properties "^1.1.3" +is-negative-zero@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.0.tgz#9553b121b0fac28869da9ed459e20c7543788461" + integrity sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE= + is-number-object@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" @@ -8211,31 +7904,17 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" - integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== - dependencies: - isobject "^4.0.0" +is-plain-object@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-4.1.1.tgz#1a14d6452cbd50790edc7fdaa0aed5a40a35ebb5" + integrity sha512-5Aw8LLVsDlZsETVMhoMXzqsXwQqr/0vlnBYzIXJbYo2F4yYlhLHs+Ez7Bod7IIQKWkJbJfxrWD7pA1Dw1TKrwA== is-potential-custom-element-name@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz#0c52e54bcca391bb2c494b21e8626d7336c6e397" integrity sha1-DFLlS8yjkbssSUsh6GJtczbG45c= -is-promise@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= - -is-regex@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== - dependencies: - has "^1.0.3" - -is-regex@^1.1.0: +is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== @@ -8258,9 +7937,9 @@ is-set@^2.0.1: integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== is-ssh@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.1.tgz#f349a8cadd24e65298037a522cf7520f2e81a0f3" - integrity sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg== + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.2.tgz#a4b82ab63d73976fd8263cceee27f99a88bdae2b" + integrity sha512-elEw0/0c2UscLrNG+OAorbP539E3rhliKPg+hDMWN9VwrDXfYK+4PBEykDPfxlYYtQvl84TascnQyobfQLHEhQ== dependencies: protocols "^1.1.0" @@ -8340,12 +8019,7 @@ is-windows@^1.0.0, is-windows@^1.0.2: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" - integrity sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog== - -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -8389,11 +8063,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isobject@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" - integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -8436,20 +8105,7 @@ istanbul-lib-instrument@^3.3.0: istanbul-lib-coverage "^2.0.5" semver "^6.0.0" -istanbul-lib-instrument@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz#61f13ac2c96cfefb076fe7131156cc05907874e6" - integrity sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg== - dependencies: - "@babel/core" "^7.7.5" - "@babel/parser" "^7.7.5" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-instrument@^4.0.3: +istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== @@ -8563,12 +8219,12 @@ jest-cli@^25.5.4: realpath-native "^2.0.0" yargs "^15.3.1" -jest-cli@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.4.0.tgz#9cbd6be818cd818d85bafe2cffa1dbf043602b28" - integrity sha512-kw2Pr3V2x9/WzSDGsbz/MJBNlCoPMxMudrIavft4bqRlv5tASjU51tyO+1Os1LdW2dAnLQZYsxFUZ8oWPyssGQ== +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.0" + "@jest/core" "^26.4.2" "@jest/test-result" "^26.3.0" "@jest/types" "^26.3.0" chalk "^4.0.0" @@ -8576,9 +8232,9 @@ jest-cli@^26.4.0: graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" prompts "^2.0.1" yargs "^15.3.1" @@ -8607,13 +8263,13 @@ jest-config@^25.5.4: pretty-format "^25.5.0" realpath-native "^2.0.0" -jest-config@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.4.0.tgz#72ff3d0418b7ee7fdd9e2bcaef4dec10b38b3b02" - integrity sha512-MxsvrBug8YY+C4QcUBtmgnHyFeW7w3Ouk/w9eplCDN8VJGVyBEZFe8Lxzfp2pSqh0Dqurqv8Oik2YkbekGUlxg== +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== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.4.0" + "@jest/test-sequencer" "^26.4.2" "@jest/types" "^26.3.0" babel-jest "^26.3.0" chalk "^4.0.0" @@ -8623,13 +8279,13 @@ jest-config@^26.4.0: jest-environment-jsdom "^26.3.0" jest-environment-node "^26.3.0" jest-get-type "^26.3.0" - jest-jasmine2 "^26.4.0" + jest-jasmine2 "^26.4.2" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" micromatch "^4.0.2" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-diff@^25.2.1, jest-diff@^25.5.0: version "25.5.0" @@ -8641,15 +8297,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.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.4.0.tgz#d073a0a11952b5bd9f1ff39bb9ad24304a0c55f7" - integrity sha512-wwC38HlOW+iTq6j5tkj/ZamHn6/nrdcEOc/fKaVILNtN2NLWGdkfRaHWwfNYr5ehaLvuoG2LfCZIcWByVj0gjg== +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== dependencies: chalk "^4.0.0" diff-sequences "^26.3.0" jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-docblock@^25.3.0: version "25.3.0" @@ -8676,16 +8332,16 @@ jest-each@^25.5.0: jest-util "^25.5.0" pretty-format "^25.5.0" -jest-each@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.4.0.tgz#c53605b20e7a0a58d6dcf4d8b2f309e607d35d5a" - integrity sha512-+cyBh1ehs6thVT/bsZVG+WwmRn2ix4Q4noS9yLZgM10yGWPW12/TDvwuOV2VZXn1gi09/ZwJKJWql6YW1C9zNw== +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" chalk "^4.0.0" jest-get-type "^26.3.0" jest-util "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-environment-jsdom@^25.5.0: version "25.5.0" @@ -8810,10 +8466,10 @@ jest-jasmine2@^25.5.4: pretty-format "^25.5.0" throat "^5.0.0" -jest-jasmine2@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.4.0.tgz#f66b2237203df4227d3bdbb4b8a0de54ba877d35" - integrity sha512-cGBxwzDDKB09EPJ4pE69BMDv+2lO442IB1xQd+vL3cua2OKdeXQK6iDlQKoRX/iP0RgU5T8sn9yahLcx/+ox8Q== +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== dependencies: "@babel/traverse" "^7.1.0" "@jest/environment" "^26.3.0" @@ -8823,21 +8479,21 @@ jest-jasmine2@^26.4.0: "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.4.0" + expect "^26.4.2" is-generator-fn "^2.0.0" - jest-each "^26.4.0" - jest-matcher-utils "^26.4.0" + jest-each "^26.4.2" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" - jest-runtime "^26.4.0" - jest-snapshot "^26.4.0" + jest-runtime "^26.4.2" + jest-snapshot "^26.4.2" jest-util "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" throat "^5.0.0" -jest-junit@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-11.0.1.tgz#944b997b7318efd1f021b4f0fce4937f8d66f392" - integrity sha512-stgc0mBoiSg/F9qWd4KkmR3K7Nk2u+M/dc1oup7gxz9mrzGcEaU2YL9/0QscVqqg3IOaA1P5ZXtozG/XR6j6nw== +jest-junit@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-11.1.0.tgz#79cd53948e44d62b2b30fa23ea0d7a899d2c8d7a" + integrity sha512-c2LFOyKY7+ZxL5zSu+WHmHfsJ2wqbOpeYJ4Uu26yMhFxny2J2NQj6AVS7M+Eaxji9Q/oIDDK5tQy0DGzDp9xOw== dependencies: mkdirp "^1.0.4" strip-ansi "^5.2.0" @@ -8852,13 +8508,13 @@ jest-leak-detector@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-leak-detector@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.4.0.tgz#1efeeef693af3c9332062876add5ac5f25cb0a70" - integrity sha512-7EXKKEKnAWUPyiVtGZzJflbPOtYUdlNoevNVOkAcPpdR8xWiYKPGNGA6sz25S+8YhZq3rmkQJYAh3/P0VnoRwA== +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== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-matcher-utils@^25.5.0: version "25.5.0" @@ -8870,15 +8526,15 @@ jest-matcher-utils@^25.5.0: jest-get-type "^25.2.6" pretty-format "^25.5.0" -jest-matcher-utils@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.4.0.tgz#2bce9a939e008b894faf1bd4b5bb58facd00c252" - integrity sha512-u+xdCdq+F262DH+PutJKXLGr2H5P3DImdJCir51PGSfi3TtbLQ5tbzKaN8BkXbiTIU6ayuAYBWTlU1nyckVdzA== +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== dependencies: chalk "^4.0.0" - jest-diff "^26.4.0" + jest-diff "^26.4.2" jest-get-type "^26.3.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-message-util@^25.5.0: version "25.5.0" @@ -8923,12 +8579,7 @@ jest-mock@^26.3.0: "@jest/types" "^26.3.0" "@types/node" "*" -jest-pnp-resolver@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" - integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== - -jest-pnp-resolver@^1.2.2: +jest-pnp-resolver@^1.2.1, 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== @@ -8952,14 +8603,14 @@ jest-resolve-dependencies@^25.5.4: jest-regex-util "^25.2.6" jest-snapshot "^25.5.1" -jest-resolve-dependencies@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.4.0.tgz#c911fc991e1ae034dd8d01c192f23459d66b87b7" - integrity sha512-hznK/hlrlhu8hwdbieRdHFKmcV83GW8t30libt/v6j1L3IEzb8iN21SaWzV8KRAAK4ijiU0kuge0wnHn+0rytQ== +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-regex-util "^26.0.0" - jest-snapshot "^26.4.0" + jest-snapshot "^26.4.2" jest-resolve@^25.5.1: version "25.5.1" @@ -9015,10 +8666,10 @@ jest-runner@^25.5.4: source-map-support "^0.5.6" throat "^5.0.0" -jest-runner@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.4.0.tgz#4cb91b266390fbf266294a7d8250d0e7bf8c7a9d" - integrity sha512-XF+tnUGolnPriu6Gg+HHWftspMjD5NkTV2mQppQnpZe39GcUangJ0al7aBGtA3GbVAcRd048DQiJPmsQRdugjw== +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== dependencies: "@jest/console" "^26.3.0" "@jest/environment" "^26.3.0" @@ -9029,13 +8680,13 @@ jest-runner@^26.4.0: emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-docblock "^26.0.0" jest-haste-map "^26.3.0" - jest-leak-detector "^26.4.0" + jest-leak-detector "^26.4.2" jest-message-util "^26.3.0" jest-resolve "^26.4.0" - jest-runtime "^26.4.0" + jest-runtime "^26.4.2" jest-util "^26.3.0" jest-worker "^26.3.0" source-map-support "^0.5.6" @@ -9073,15 +8724,15 @@ jest-runtime@^25.5.4: strip-bom "^4.0.0" yargs "^15.3.1" -jest-runtime@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.4.0.tgz#0b860f2bcf4f6047919c5b3fe74ed6adbe0056b4" - integrity sha512-1fjZgGpkyQBUTo59Vi19I4IcsBwzY6uwVFNjUmR06iIi3XRErkY28yimi4IUDRrofQErqcDEw2n3DF9WmQ6vEg== +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.0" + "@jest/globals" "^26.4.2" "@jest/source-map" "^26.3.0" "@jest/test-result" "^26.3.0" "@jest/transform" "^26.3.0" @@ -9092,15 +8743,15 @@ jest-runtime@^26.4.0: exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.4.0" + jest-config "^26.4.2" jest-haste-map "^26.3.0" jest-message-util "^26.3.0" jest-mock "^26.3.0" jest-regex-util "^26.0.0" jest-resolve "^26.4.0" - jest-snapshot "^26.4.0" + jest-snapshot "^26.4.2" jest-util "^26.3.0" - jest-validate "^26.4.0" + jest-validate "^26.4.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.3.1" @@ -9141,33 +8792,34 @@ jest-snapshot@^25.5.1: pretty-format "^25.5.0" semver "^6.3.0" -jest-snapshot@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.4.0.tgz#efd42eef09bcb33e9a3eb98e229f2368c73c9235" - integrity sha512-vFGmNGWHMBomrlOpheTMoqihymovuH3GqfmaEIWoPpsxUXyxT3IlbxI5I4m2vg0uv3HUJYg5JoGrkgMzVsAwCg== +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" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.4.0" + expect "^26.4.2" graceful-fs "^4.2.4" - jest-diff "^26.4.0" + jest-diff "^26.4.2" jest-get-type "^26.3.0" jest-haste-map "^26.3.0" - jest-matcher-utils "^26.4.0" + jest-matcher-utils "^26.4.2" jest-message-util "^26.3.0" jest-resolve "^26.4.0" natural-compare "^1.4.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" semver "^7.3.2" -jest-util@26.x: - version "26.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.1.0.tgz#80e85d4ba820decacf41a691c2042d5276e5d8d8" - integrity sha512-rNMOwFQevljfNGvbzNQAxdmXQ+NawW/J72dmddsK0E8vgxXCMtwQ/EH0BiWEIxh0hhMcTsxwAxINt7Lh46Uzbg== +jest-util@26.x, jest-util@^26.3.0: + version "26.3.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" + integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== dependencies: - "@jest/types" "^26.1.0" + "@jest/types" "^26.3.0" + "@types/node" "*" chalk "^4.0.0" graceful-fs "^4.2.4" is-ci "^2.0.0" @@ -9184,18 +8836,6 @@ jest-util@^25.5.0: is-ci "^2.0.0" make-dir "^3.0.0" -jest-util@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.3.0.tgz#a8974b191df30e2bf523ebbfdbaeb8efca535b3e" - integrity sha512-4zpn6bwV0+AMFN0IYhH/wnzIQzRaYVrz1A8sYnRnj4UXDXbOVtWmlaZkO9mipFqZ13okIfN87aDoJWB7VH6hcw== - dependencies: - "@jest/types" "^26.3.0" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - 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" @@ -9208,17 +8848,17 @@ jest-validate@^25.5.0: leven "^3.1.0" pretty-format "^25.5.0" -jest-validate@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.4.0.tgz#3874a7cc9e27328afac88899ee9e2fae5e3a4293" - integrity sha512-t56Z/FRMrLP6mpmje7/YgHy0wOzcuc6i3LBXz6kjmsUWYN62OuMdC86Vg9/dX59SvyitSqqegOrx+h7BkNXeaQ== +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== dependencies: "@jest/types" "^26.3.0" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.4.0" + pretty-format "^26.4.2" jest-watcher@^25.5.0: version "25.5.0" @@ -9262,7 +8902,7 @@ jest-worker@^26.3.0: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^25.4.0, jest@^25.5.2, jest@^25.5.3, jest@^25.5.4: +jest@^25.4.0, jest@^25.5.0, jest@^25.5.2, jest@^25.5.3, 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== @@ -9271,14 +8911,14 @@ jest@^25.4.0, jest@^25.5.2, jest@^25.5.3, jest@^25.5.4: import-local "^3.0.2" jest-cli "^25.5.4" -jest@^26.0.4: - version "26.4.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.4.0.tgz#495e81dcff40f8a656e567c664af87b29c5c5922" - integrity sha512-lNCOS+ckRHE1wFyVtQClBmbsOVuH2GWUTJMDL3vunp9DXcah+V8vfvVVApngClcdoc3rgZpqOfCNKLjxjj2l4g== +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.0" + "@jest/core" "^26.4.2" import-local "^3.0.2" - jest-cli "^26.4.0" + jest-cli "^26.4.2" jmespath@0.15.0: version "0.15.0" @@ -9286,9 +8926,9 @@ jmespath@0.15.0: integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= js-base64@^2.1.9: - version "2.5.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209" - integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ== + version "2.6.4" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.6.4.tgz#f4e686c5de1ea1f867dbcad3d46d969428df98c4" + integrity sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== js-levenshtein@^1.1.6: version "1.1.6" @@ -9301,9 +8941,9 @@ js-levenshtein@^1.1.6: integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1, js-yaml@^3.2.7: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + version "3.14.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" + integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -9419,65 +9059,65 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -jsii-diff@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.9.0.tgz#56102a1983b32c4a25d0b062fa4ffc5cdf5e8c96" - integrity sha512-kBnAZ4oTRDthPRwpM60XWsAE2O6lUw2+WZgLiPRKWgMK1t5wnXeZvj+W8oeBt/SzRM6trcEHPzkL3rKaJFi7+A== +jsii-diff@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jsii-diff/-/jsii-diff-1.11.0.tgz#b595cdee5289d359c61b3a1e75dd2e70942ab020" + integrity sha512-FQTPmSOV7Iok8gmq31dGSW6KclJ2YTi2TNHeuXTwESooZ9NO1XzpuGz0GvNX469ADBuVb4XrWNmJbd+lctdkdg== dependencies: - "@jsii/spec" "^1.9.0" + "@jsii/spec" "^1.11.0" fs-extra "^9.0.1" - jsii-reflect "^1.9.0" + jsii-reflect "^1.11.0" log4js "^6.3.0" - typescript "~3.9.6" - yargs "^15.4.0" + typescript "~3.9.7" + yargs "^15.4.1" -jsii-pacmak@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.9.0.tgz#4acc92991e65a7d308a5d029c39fe78b0050abf5" - integrity sha512-rfOslRr+w0EcN4GnT8CqAOHnRf9DRQLH4QAPUuyHKfzXESARn4BIZwL7fbuGxzvuFSM53MoXd1fBvvUfx8mL5g== +jsii-pacmak@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jsii-pacmak/-/jsii-pacmak-1.11.0.tgz#2110764ed4f37192ba6fc3b3911b2869b59038fd" + integrity sha512-rfu13yMmL/KUv3MSaPyhOUvQ5RlOb8NJV/eM6wldJprySDef0sDYHoQJJPfhFtlwuAFmBPxefiXd0+FldLk7AQ== dependencies: - "@jsii/spec" "^1.9.0" + "@jsii/spec" "^1.11.0" clone "^2.1.2" - codemaker "^1.9.0" + codemaker "^1.11.0" commonmark "^0.29.1" escape-string-regexp "^4.0.0" fs-extra "^9.0.1" - jsii-reflect "^1.9.0" - jsii-rosetta "^1.9.0" + jsii-reflect "^1.11.0" + jsii-rosetta "^1.11.0" semver "^7.3.2" spdx-license-list "^6.2.0" xmlbuilder "^15.1.1" - yargs "^15.4.0" + yargs "^15.4.1" -jsii-reflect@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.9.0.tgz#57a8dcf867b9f329b3bb62057d62aef5f2743762" - integrity sha512-jvay0EzZT1VvqK0h6AlvyTstQd1SVKTN4jpi9ZdDzyb6/nJ4sKUZYJPTFNzZv/+2ee/eH/ZuYiZ9Keu0STWq8A== +jsii-reflect@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jsii-reflect/-/jsii-reflect-1.11.0.tgz#45739fcff6b6ff0a8675893c3285489b555d9d42" + integrity sha512-XZTC5A66lT2rjAc3mKXzN6VnHA6JDOOespmhAlYxVg9Mo7u5lEl5nupoS7wBUvXHfINX8h+0XkmdCvZbMuKlQQ== dependencies: - "@jsii/spec" "^1.9.0" + "@jsii/spec" "^1.11.0" colors "^1.4.0" fs-extra "^9.0.1" - oo-ascii-tree "^1.9.0" - yargs "^15.4.0" + oo-ascii-tree "^1.11.0" + yargs "^15.4.1" -jsii-rosetta@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.9.0.tgz#fbb2017b2fba87bf0050662a369a68bea316861a" - integrity sha512-xtFTxxg/RimWSOehxcIEq/lPEPEGxrLQwTzCbsDMDPO/+gK+foojz+P0ACyo6ZiR3LhXs6y66JR9NCQcy8YixQ== +jsii-rosetta@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-1.11.0.tgz#73688c1106e811bdb30922439ee80e482ad2cfc9" + integrity sha512-TvWOu+GM5pumNb5U+oDtIBXwVEFfo1HrGCdvb5Y6ysakLtHN521m39/tt1JVITi8vz7PlEy5jEPKkHoeR9+lXw== dependencies: - "@jsii/spec" "^1.9.0" + "@jsii/spec" "^1.11.0" commonmark "^0.29.1" fs-extra "^9.0.1" - typescript "~3.9.6" + typescript "~3.9.7" xmldom "^0.3.0" - yargs "^15.4.0" + yargs "^15.4.1" -jsii@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.9.0.tgz#3a039b4fb9838460d9f996484b48cf89283de664" - integrity sha512-vtzzgYDF6WGnAbTP4+ko4QUmz3O4rS8BN5iCYOf5Kh87VVhb3+vkdijSR7esnWJCT7/a+rJfMX5pztec8O/mvw== +jsii@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/jsii/-/jsii-1.11.0.tgz#104454263fa7a57a73977e27de06b0416c894b1f" + integrity sha512-5/YZPqpSoXSi6h1JLMv8fa4iIyGfL14Va5p1J2NXkB7cQj5gPbl8gvi0KJiqmQXyF7urczGJB8vzuU15FyCalg== dependencies: - "@jsii/spec" "^1.9.0" + "@jsii/spec" "^1.11.0" case "^1.6.3" colors "^1.4.0" deep-equal "^2.0.3" @@ -9487,8 +9127,8 @@ jsii@^1.9.0: semver-intersect "^1.4.0" sort-json "^2.0.0" spdx-license-list "^6.2.0" - typescript "~3.9.6" - yargs "^15.4.0" + typescript "~3.9.7" + yargs "^15.4.1" json-diff@^0.5.4: version "0.5.4" @@ -9504,6 +9144,11 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.0.tgz#371873c5ffa44304a6ba12419bcfa95f404ae081" + integrity sha512-o3aP+RsWDJZayj1SbHNQAI8x0v3T3SKiGoZlNYfbUP1S3omJQ6i9CnqADqkSPaOAxwua4/1YWx5CM7oiChJt2Q== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -9591,17 +9236,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jszip@*: - version "3.4.0" - resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.4.0.tgz#1a69421fa5f0bb9bc222a46bca88182fba075350" - integrity sha512-gZAOYuPl4EhPTXT0GjhI3o+ZAz3su6EhLrKUoAivcKqyqC7laS5JEv4XWZND9BgcDcF83vI85yGbDmDR6UhrIg== - dependencies: - lie "~3.3.0" - pako "~1.0.2" - readable-stream "~2.3.6" - set-immediate-shim "~1.0.1" - -jszip@^3.5.0: +jszip@*, jszip@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6" integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA== @@ -9635,7 +9270,7 @@ kind-of@^5.0.0: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9645,6 +9280,24 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +lambda-leak@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lambda-leak/-/lambda-leak-2.0.0.tgz#771985d3628487f6e885afae2b54510dcfb2cd7e" + integrity sha1-dxmF02KEh/boha+uK1RRDc+yzX4= + +lambda-tester@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/lambda-tester/-/lambda-tester-3.6.0.tgz#ceb7d4f4f0da768487a05cff37dcd088508b5247" + integrity sha512-F2ZTGWCLyIR95o/jWK46V/WnOCFAEUG/m/V7/CLhPJ7PCM+pror1rZ6ujP3TkItSGxUfpJi0kqwidw+M/nEqWw== + dependencies: + app-root-path "^2.2.1" + dotenv "^8.0.0" + dotenv-json "^1.0.0" + lambda-leak "^2.0.0" + semver "^6.1.1" + uuid "^3.3.2" + vandium-utils "^1.1.1" + lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -9721,19 +9374,19 @@ lines-and-columns@^1.1.6: integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= lint-staged@^10.0.8: - version "10.2.11" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.2.11.tgz#713c80877f2dc8b609b05bc59020234e766c9720" - integrity sha512-LRRrSogzbixYaZItE2APaS4l2eJMjjf5MbclRZpLJtcQJShcvUzKXsNeZgsLIZ0H0+fg2tL4B59fU9wHIHtFIA== + version "10.2.12" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-10.2.12.tgz#882c814f539979aa6e854199560d63bbf807542f" + integrity sha512-pbnhf37eD1mn1BGWbuqxZ5Brth6R9V5c0XapTUIjAAcUlaNyvhIJKiMn0e3xPL98I3b0pbq3b8zTpgHO0ZzmaQ== dependencies: - chalk "^4.0.0" - cli-truncate "2.1.0" - commander "^5.1.0" - cosmiconfig "^6.0.0" + chalk "^4.1.0" + cli-truncate "^2.1.0" + commander "^6.0.0" + cosmiconfig "^7.0.0" debug "^4.1.1" dedent "^0.7.0" - enquirer "^2.3.5" - execa "^4.0.1" - listr2 "^2.1.0" + enquirer "^2.3.6" + execa "^4.0.3" + listr2 "^2.6.0" log-symbols "^4.0.0" micromatch "^4.0.2" normalize-path "^3.0.0" @@ -9741,10 +9394,10 @@ lint-staged@^10.0.8: string-argv "0.3.1" stringify-object "^3.3.0" -listr2@^2.1.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-2.5.1.tgz#f265dddf916c8a9b475437b34ae85a7d8f495c7a" - integrity sha512-qkNRW70SwfwWLD/eiaTf2tfgWT/ZvjmMsnEFJOCzac0cjcc8rYHDBr1eQhRxopj6lZO7Oa5sS/pZzS6q+BsX+w== +listr2@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-2.6.0.tgz#788a3d202978a1b8582062952cbc49272c8e206a" + integrity sha512-nwmqTJYQQ+AsKb4fCXH/6/UmLCEDL1jkRAdSn9M6cEUzoRGrs33YD/3N86gAZQnGZ6hxV18XSdlBcJ1GTmetJA== dependencies: chalk "^4.1.0" cli-truncate "^2.1.0" @@ -10006,9 +9659,9 @@ lru-cache@^5.1.1: yallist "^3.0.2" macos-release@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" - integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.4.1.tgz#64033d0ec6a5e6375155a74b1a1eba8e509820ac" + integrity sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg== make-dir@^1.0.0: version "1.3.0" @@ -10026,9 +9679,9 @@ make-dir@^2.0.0, make-dir@^2.1.0: semver "^5.6.0" make-dir@^3.0.0, make-dir@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" - integrity sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w== + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" @@ -10105,14 +9758,14 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -md5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" - integrity sha1-U6s41f48iJG6RlMp6iP6wFQBJvk= +md5@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" + integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== dependencies: - charenc "~0.0.1" - crypt "~0.0.1" - is-buffer "~1.1.1" + charenc "0.0.2" + crypt "0.0.2" + is-buffer "~1.1.6" mdn-data@2.0.4: version "2.0.4" @@ -10160,32 +9813,16 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -meow@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" - integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== - dependencies: - camelcase-keys "^4.0.0" - decamelize-keys "^1.0.0" - loud-rejection "^1.0.0" - minimist-options "^3.0.1" - normalize-package-data "^2.3.4" - read-pkg-up "^3.0.0" - redent "^2.0.0" - trim-newlines "^2.0.0" - yargs-parser "^10.0.0" - meow@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/meow/-/meow-7.0.0.tgz#2d21adc6df0e1b4659b2b2ce63852d954e5c440a" - integrity sha512-He6nRo6zYQtzdm0rUKRjpc+V2uvfUnz76i2zxosiLrAvKhk9dSRqWabL/3fNZv9hpb3PQIJNym0M0pzPZa0pvw== + version "7.1.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-7.1.0.tgz#50ecbcdafa16f8b58fb7eb9675b933f6473b3a59" + integrity sha512-kq5F0KVteskZ3JdfyQFivJEj2RaA8NFsS4+r9DaMKLcUHpk5OcHS3Q0XkCXONB1mZRPsu/Y/qImKri0nwSEZog== dependencies: "@types/minimist" "^1.2.0" - arrify "^2.0.1" camelcase-keys "^6.2.2" decamelize-keys "^1.1.0" hard-rejection "^2.1.0" - minimist-options "^4.0.2" + minimist-options "4.1.0" normalize-package-data "^2.5.0" read-pkg-up "^7.0.1" redent "^3.0.0" @@ -10210,16 +9847,19 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" - integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== - -merge2@^1.3.0: +merge2@^1.2.3, merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +micromatch@4.x, micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -10239,14 +9879,6 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -10255,17 +9887,17 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.43.0: - version "1.43.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" - integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.44.0: + version "1.44.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" + integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.26" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" - integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== + version "2.1.27" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" + integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== dependencies: - mime-db "1.43.0" + mime-db "1.44.0" mime@^2.4.4: version "2.4.6" @@ -10283,9 +9915,9 @@ mimic-fn@^2.1.0: integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== min-indent@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" - integrity sha1-z8RcN+nsDY8KDsPdTvf3w6vjklY= + version "1.0.1" + resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" + integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" @@ -10304,18 +9936,19 @@ minimatch@>=3.0, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist-options@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" - integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== +minimist-options@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" + integrity sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" + kind-of "^6.0.3" -minimist-options@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.0.2.tgz#29c4021373ded40d546186725e57761e4b1984a7" - integrity sha512-seq4hpWkYSUh1y7NXxzucwAN9yVlBc3Upgdjz8vLCP97jG8kaOmzYrVH/m7tQ1NYD1wdtZbSLfdy4zFmRWuc/w== +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" @@ -10383,17 +10016,17 @@ mkdirp@*, mkdirp@1.x, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: +mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: minimist "^1.2.5" -mock-fs@^4.12.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.12.0.tgz#a5d50b12d2d75e5bec9dac3b67ffe3c41d31ade4" - integrity sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ== +mock-fs@^4.13.0: + version "4.13.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.13.0.tgz#31c02263673ec3789f90eb7b6963676aa407a598" + integrity sha512-DD0vOdofJdoaRNtnWcrXe6RQbpHkPPmtqGq14uRX0F8ZKJ5nv89CVTYl/BZdppDxBDaV0hl75htg3abpEWlPZA== mockery@^2.1.0: version "2.1.0" @@ -10489,9 +10122,9 @@ ncp@^2.0.0: integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= neo-async@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nested-error-stacks@^2.0.0: version "2.1.0" @@ -10508,10 +10141,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nise@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/nise/-/nise-4.0.3.tgz#9f79ff02fa002ed5ffbc538ad58518fa011dc913" - integrity sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg== +nise@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/nise/-/nise-4.0.4.tgz#d73dea3e5731e6561992b8f570be9e363c4512dd" + integrity sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A== dependencies: "@sinonjs/commons" "^1.7.0" "@sinonjs/fake-timers" "^6.0.0" @@ -10519,10 +10152,21 @@ nise@^4.0.1: just-extend "^4.0.2" path-to-regexp "^1.7.0" -nock@^13.0.2: - version "13.0.2" - resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.2.tgz#3e50f88348edbb90cce1bbbf0a3ea6a068993983" - integrity sha512-Wm8H22iT3UKPDf138tmgJ0NRfCLd9f2LByki9T2mGHnB66pEqvJh3gV/up1ZufZF24n7/pDYyLGybdqOzF3JIw== +nock@^11.7.0: + version "11.9.1" + resolved "https://registry.yarnpkg.com/nock/-/nock-11.9.1.tgz#2b026c5beb6d0dbcb41e7e4cefa671bc36db9c61" + integrity sha512-U5wPctaY4/ar2JJ5Jg4wJxlbBfayxgKbiAeGh+a1kk6Pwnc2ZEuKviLyDSG6t0uXl56q7AALIxoM6FJrBSsVXA== + dependencies: + debug "^4.1.0" + json-stringify-safe "^5.0.1" + lodash "^4.17.13" + mkdirp "^0.5.0" + propagate "^2.0.0" + +nock@^13.0.4: + version "13.0.4" + resolved "https://registry.yarnpkg.com/nock/-/nock-13.0.4.tgz#9fb74db35d0aa056322e3c45be14b99105cd7510" + integrity sha512-alqTV8Qt7TUbc74x1pKRLSENzfjp4nywovcJgi/1aXDiUxXdt7TkruSTF5MDWPP7UoPVgea4F9ghVdmX0xxnSA== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" @@ -10564,9 +10208,9 @@ node-gyp-build@^4.2.1, node-gyp-build@^4.2.2: integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== node-gyp@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.0.tgz#8e31260a7af4a2e2f994b0673d4e0b3866156332" - integrity sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw== + version "5.1.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-5.1.1.tgz#eb915f7b631c937d282e33aed44cb7a025f62a3e" + integrity sha512-WH0WKGi+a4i4DUt2mHnvocex/xPLp9pYt5R6M2JdFB7pJ7Z34hveZ4nDTGTiLXCkitA9T8HFZjhinBCiVHYcWw== dependencies: env-paths "^2.2.0" glob "^7.1.4" @@ -10601,16 +10245,16 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-notifier@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-7.0.2.tgz#3a70b1b70aca5e919d0b1b022530697466d9c675" - integrity sha512-ux+n4hPVETuTL8+daJXTOC6uKLgMsl1RYfFv7DKRzyvzBapqco0rZZ9g72ZN8VS6V+gvNYHYa/ofcCY8fkJWsA== +node-notifier@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.0.tgz#a7eee2d51da6d0f7ff5094bc7108c911240c1620" + integrity sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA== dependencies: growly "^1.3.0" is-wsl "^2.2.0" semver "^7.3.2" shellwords "^0.1.1" - uuid "^8.2.0" + uuid "^8.3.0" which "^2.0.2" node-preload@^0.2.1: @@ -10861,10 +10505,10 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-inspect@^1.7.0, object-inspect@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.8.0.tgz#df807e5ecf53a609cc6bfe93eac3cc7be5b3a9d0" + integrity sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== object-is@^1.0.1, object-is@^1.1.2: version "1.1.2" @@ -10948,21 +10592,21 @@ onetime@^2.0.0: mimic-fn "^1.0.0" onetime@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" - integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" -oo-ascii-tree@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.9.0.tgz#e4612f188a77b45ce68b44ed66d6aa7db6db1886" - integrity sha512-IuxxWmKSuzVNxHsAmLQTTj0tN9TdxQww2lrNeqObhXKjkjvfQGAdSO9ft6prieR0BDyfowZv3ntnmeaUlqM0Tg== +oo-ascii-tree@^1.11.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/oo-ascii-tree/-/oo-ascii-tree-1.11.0.tgz#f05084deb08e41b4d14b62bf9613821616654e66" + integrity sha512-I5EDW45Ou4ZgNFWEnPySPdLXqR6V18spR1QKxuiKsQ2/4TjRshfWkdUdWDo05iZjGvPdOXEjCEoSZwfiO1ClFg== open@^7.0.3: - version "7.1.0" - resolved "https://registry.yarnpkg.com/open/-/open-7.1.0.tgz#68865f7d3cb238520fa1225a63cf28bcf8368a1c" - integrity sha512-lLPI5KgOwEYCDKXf4np7y1PBEkj7HYIyP2DY8mVDRnx0VIIu6bNrRB0R66TuO7Mack6EnTNLm4uvcl1UoklTpA== + version "7.2.0" + resolved "https://registry.yarnpkg.com/open/-/open-7.2.0.tgz#212959bd7b0ce2e8e3676adc76e3cf2f0a2498b4" + integrity sha512-4HeyhxCvBTI5uBePsAdi55C5fmqnWZ2e2MlmvWi5KW5tdH5rxoiv/aMtbeVxKZc3eWkT1GymMnLG8XC4Rq4TDQ== dependencies: is-docker "^2.0.0" is-wsl "^2.1.1" @@ -11274,27 +10918,27 @@ parse-json@^4.0.0: json-parse-better-errors "^1.0.1" parse-json@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" - integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + version "5.1.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.1.0.tgz#f96088cdf24a8faa9aea9a009f2d9d942c999646" + integrity sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" parse-path@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff" - integrity sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA== + version "4.0.2" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.2.tgz#ef14f0d3d77bae8dd4bc66563a4c151aac9e65aa" + integrity sha512-HSqVz6iuXSiL8C1ku5Gl1Z5cwDd9Wo0q8CoffdAghP6bz8pJa1tcMC+m4N+z6VAS8QdksnIGq1TB6EgR4vPR6w== dependencies: is-ssh "^1.3.0" protocols "^1.4.0" parse-url@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.1.tgz#99c4084fc11be14141efa41b3d117a96fcb9527f" - integrity sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg== + version "5.0.2" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-5.0.2.tgz#856a3be1fcdf78dc93fc8b3791f169072d898b59" + integrity sha512-Czj+GIit4cdWtxo3ISZCvLiUjErSo0iI3wJ+q9Oi3QuMYTI6OZu+7cewMWZ+C1YAnKhYTk6/TLuhIgCypLthPA== dependencies: is-ssh "^1.3.0" normalize-url "^3.3.0" @@ -11829,14 +11473,21 @@ postcss@^6.0.1: source-map "^0.6.1" supports-color "^5.4.0" -posthtml-parser@^0.4.1, posthtml-parser@^0.4.2: +posthtml-parser@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.4.2.tgz#a132bbdf0cd4bc199d34f322f5c1599385d7c6c1" integrity sha512-BUIorsYJTvS9UhXxPTzupIztOMVNPa/HtAm9KHni9z6qEfiJ1bpOBL5DfUOL9XAc3XkLIEzBzpph+Zbm4AdRAg== dependencies: htmlparser2 "^3.9.2" -posthtml-render@^1.1.5, posthtml-render@^1.2.2: +posthtml-parser@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.5.0.tgz#571058a3b63c1704964ffc25bbe69ffda213244e" + integrity sha512-BsZFAqOeX9lkJJPKG2JmGgtm6t++WibU7FeS40FNNGZ1KS2szRSRQ8Wr2JLvikDgAecrQ/9V4sjugTAin2+KVw== + dependencies: + htmlparser2 "^3.9.2" + +posthtml-render@^1.1.5, posthtml-render@^1.2.2, posthtml-render@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/posthtml-render/-/posthtml-render-1.2.3.tgz#da1cf7ba4efb42cfe9c077f4f41669745de99b6d" integrity sha512-rGGayND//VwTlsYKNqdILsA7U/XP0WJa6SMcdAEoqc2WRM5QExplGg/h9qbTuHz7mc2PvaXU+6iNxItvr5aHMg== @@ -11850,12 +11501,12 @@ posthtml@^0.11.3: posthtml-render "^1.1.5" posthtml@^0.13.1: - version "0.13.1" - resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.13.1.tgz#3b85df6b0e084370a713302043c1c0f47cbaa5a8" - integrity sha512-8aJZ63WYL9YsAZVcrIn6U0dSYbna7hcTceZjnbH7dilg01t4t3JDx0UovbhGFscFJg/++qhECCjGEQuJAqD7dA== + version "0.13.3" + resolved "https://registry.yarnpkg.com/posthtml/-/posthtml-0.13.3.tgz#9702d745108d532a9d5808985e0dafd81b09f7bd" + integrity sha512-5NL2bBc4ihAyoYnY0EAQrFQbJNE1UdvgC1wjYts0hph7jYeU2fa5ki3/9U45ce9V6M1vLMEgUX2NXe/bYL+bCQ== dependencies: - posthtml-parser "^0.4.2" - posthtml-render "^1.2.2" + posthtml-parser "^0.5.0" + posthtml-render "^1.2.3" prelude-ls@~1.1.2: version "1.1.2" @@ -11872,10 +11523,10 @@ pretty-format@^25.2.1, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" -pretty-format@^26.4.0: - version "26.4.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.4.0.tgz#c08073f531429e9e5024049446f42ecc9f933a3b" - integrity sha512-mEEwwpCseqrUtuMbrJG4b824877pM5xald3AkilJ47Po2YLr97/siejYQHqj2oDQBeJNbu+Q0qUuekJ8F0NAPg== +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== dependencies: "@jest/types" "^26.3.0" ansi-regex "^5.0.0" @@ -11960,9 +11611,9 @@ proto-list@~1.2.1: integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= protocols@^1.1.0, protocols@^1.4.0: - version "1.4.7" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.7.tgz#95f788a4f0e979b291ffefcf5636ad113d037d32" - integrity sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg== + version "1.4.8" + resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" + integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== protoduck@^5.0.1: version "5.0.1" @@ -12158,16 +11809,14 @@ read-cmd-shim@^1.0.1: graceful-fs "^4.1.2" "read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: - version "2.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.1.tgz#16aa66c59e7d4dad6288f179dd9295fd59bb98f1" - integrity sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A== + version "2.1.2" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" + integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== dependencies: glob "^7.1.1" - json-parse-better-errors "^1.0.1" + json-parse-even-better-errors "^2.3.0" normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" - optionalDependencies: - graceful-fs "^4.1.2" read-package-tree@^5.1.6: version "5.3.1" @@ -12354,9 +12003,9 @@ regenerate@^1.4.0: integrity sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A== regenerator-runtime@^0.13.4: - version "0.13.5" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" - integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== regenerator-transform@^0.14.2: version "0.14.5" @@ -12444,13 +12093,6 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request-promise-core@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" - integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== - dependencies: - lodash "^4.17.15" - request-promise-core@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" @@ -12458,7 +12100,7 @@ request-promise-core@1.1.4: dependencies: lodash "^4.17.19" -request-promise-native@^1.0.5, request-promise-native@^1.0.8: +request-promise-native@^1.0.5, request-promise-native@^1.0.7, 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== @@ -12467,15 +12109,6 @@ request-promise-native@^1.0.5, request-promise-native@^1.0.8: stealthy-require "^1.1.1" tough-cookie "^2.3.3" -request-promise-native@^1.0.7: - version "1.0.8" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" - integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== - dependencies: - request-promise-core "1.1.3" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - request@^2.88.0, request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -12561,20 +12194,13 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.17.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, 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" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== dependencies: path-parse "^1.0.6" -resolve@^1.10.0, resolve@^1.11.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2: - version "1.16.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.16.1.tgz#49fac5d8bacf1fd53f200fa51247ae736175832c" - integrity sha512-rmAglCSqWWMrrBv/XM6sW0NuRFiKViw/W4d9EbC4pt+49H8JwHy+mcGmALTEg504AUDcLTvb1T2q3E9AnmY+ig== - dependencies: - path-parse "^1.0.6" - restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -12656,11 +12282,9 @@ rsvp@^4.8.4: integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== run-async@^2.2.0, run-async@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" - integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== - dependencies: - is-promise "^2.1.0" + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== run-parallel@^1.1.9: version "1.1.9" @@ -12674,26 +12298,14 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rxjs@^6.4.0, rxjs@^6.5.3: - version "6.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" - integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== - dependencies: - tslib "^1.9.0" - -rxjs@^6.6.2: +rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.2: version "6.6.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" integrity sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg== dependencies: tslib "^1.9.0" -safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== - -safe-buffer@^5.1.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -12710,7 +12322,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -12771,6 +12383,11 @@ semver-intersect@^1.4.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@6.x, semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" @@ -12781,11 +12398,6 @@ semver@7.x, semver@^7.1.1, semver@^7.2.2, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - serialize-to-js@^3.0.1: version "3.1.1" resolved "https://registry.yarnpkg.com/serialize-to-js/-/serialize-to-js-3.1.1.tgz#b3e77d0568ee4a60bfe66287f991e104d3a1a4ac" @@ -12875,12 +12487,12 @@ shellwords@^0.1.1: integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== side-channel@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947" - integrity sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.3.tgz#cdc46b057550bbab63706210838df5d4c19519c3" + integrity sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g== dependencies: - es-abstract "^1.17.0-next.1" - object-inspect "^1.7.0" + es-abstract "^1.18.0-next.0" + object-inspect "^1.8.0" signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.3" @@ -12894,17 +12506,17 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^9.0.1, sinon@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.0.2.tgz#b9017e24633f4b1c98dfb6e784a5f0509f5fd85d" - integrity sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A== +sinon@^9.0.1, sinon@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.0.3.tgz#bffc3ec28c936332cd2a41833547b9eed201ecff" + integrity sha512-IKo9MIM111+smz9JGwLmw5U1075n1YXeAq8YeSFlndCLhAL5KGn6bLgu7b/4AYHTV/LcEMcRm2wU2YiL55/6Pg== dependencies: "@sinonjs/commons" "^1.7.2" "@sinonjs/fake-timers" "^6.0.1" "@sinonjs/formatio" "^5.0.1" - "@sinonjs/samsam" "^5.0.3" + "@sinonjs/samsam" "^5.1.0" diff "^4.0.2" - nise "^4.0.1" + nise "^4.0.4" supports-color "^7.1.0" sisteransi@^1.0.4: @@ -13085,22 +12697,22 @@ spawn-wrap@^2.0.0: which "^2.0.1" spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" @@ -13130,9 +12742,9 @@ split2@^2.0.0: through2 "^2.0.2" split2@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/split2/-/split2-3.1.1.tgz#c51f18f3e06a8c4469aaab487687d8d956160bb6" - integrity sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q== + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== dependencies: readable-stream "^3.0.0" @@ -13187,16 +12799,16 @@ stack-utils@^2.0.2: dependencies: escape-string-regexp "^2.0.0" -standard-version@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-8.0.2.tgz#02ed7131f83046bd04358dc54f97d42c4b2fd828" - integrity sha512-L8X9KFq2SmVmaeZgUmWHFJMOsEWpjgFAwqic6yIIoveM1kdw1vH4Io03WWxUDjypjGqGU6qUtcJoR8UvOv5w3g== +standard-version@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/standard-version/-/standard-version-9.0.0.tgz#814055add91eec8679a773768927f927183fc818" + integrity sha512-eRR04IscMP3xW9MJTykwz13HFNYs8jS33AGuDiBKgfo5YrO0qX0Nxb4rjupVwT5HDYL/aR+MBEVLjlmVFmFEDQ== dependencies: chalk "^2.4.2" - conventional-changelog "3.1.21" + conventional-changelog "3.1.23" conventional-changelog-config-spec "2.1.0" - conventional-changelog-conventionalcommits "4.3.0" - conventional-recommended-bump "6.0.9" + conventional-changelog-conventionalcommits "4.4.0" + conventional-recommended-bump "6.0.10" detect-indent "^6.0.0" detect-newline "^3.1.0" dotgitignore "^2.1.0" @@ -13319,7 +12931,7 @@ string.prototype.repeat@^0.2.0: resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz#aba36de08dcee6a5a337d49b2ea1da1b28fc0ecf" integrity sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8= -string.prototype.trimend@^1.0.0, string.prototype.trimend@^1.0.1: +string.prototype.trimend@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== @@ -13327,25 +12939,7 @@ string.prototype.trimend@^1.0.0, string.prototype.trimend@^1.0.1: define-properties "^1.1.3" es-abstract "^1.17.5" -string.prototype.trimleft@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" - integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimstart "^1.0.0" - -string.prototype.trimright@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" - integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.5" - string.prototype.trimend "^1.0.0" - -string.prototype.trimstart@^1.0.0, string.prototype.trimstart@^1.0.1: +string.prototype.trimstart@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== @@ -13461,9 +13055,9 @@ strip-indent@^3.0.0: min-indent "^1.0.0" strip-json-comments@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" - integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strong-log-transformer@^2.0.0: version "2.1.0" @@ -13638,9 +13232,9 @@ tap@^12.0.1: yapool "^1.0.0" tar-stream@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" - integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== + version "2.1.3" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.3.tgz#1e2022559221b7866161660f118255e20fa79e41" + integrity sha512-Z9yri56Dih8IaK8gncVPx4Wqt86NDmQTSh49XLZgjWpGZL9GK9HKParS2scqHCC4w6X9Gh2jwaU45V47XTKwVA== dependencies: bl "^4.0.1" end-of-stream "^1.4.1" @@ -13759,9 +13353,9 @@ thenify-all@^1.0.0: thenify ">= 3.1.0 < 4" "thenify@>= 3.1.0 < 4": - version "3.3.0" - resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839" - integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk= + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== dependencies: any-promise "^1.0.0" @@ -13779,10 +13373,11 @@ through2@^2.0.0, through2@^2.0.2: xtend "~4.0.1" through2@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" - integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + version "3.0.2" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4" + integrity sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ== dependencies: + inherits "^2.0.4" readable-stream "2 || 3" through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: @@ -13807,14 +13402,6 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -tiny-glob@^0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.6.tgz#9e056e169d9788fe8a734dfa1ff02e9b92ed7eda" - integrity sha512-A7ewMqPu1B5PWwC3m7KVgAu96Ch5LA0w4SnEN/LbDREj/gAD0nPWboRbn8YoP9ISZXqeNAlMvKSKoEuhcfK3Pw== - dependencies: - globalyzer "^0.1.0" - globrex "^0.1.1" - tmatch@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-4.0.0.tgz#ba178007f30bf6a70f37c643fca5045fb2f8c448" @@ -13935,11 +13522,28 @@ trivial-deferred@^1.0.1: resolved "https://registry.yarnpkg.com/trivial-deferred/-/trivial-deferred-1.0.1.tgz#376d4d29d951d6368a6f7a0ae85c2f4d5e0658f3" integrity sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= -ts-jest@^26.1.3: - version "26.1.3" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.1.3.tgz#aac928a05fdf13e3e6dfbc8caec3847442667894" - integrity sha512-beUTSvuqR9SmKQEylewqJdnXWMVGJRFqSz2M8wKJe7GBMmLZ5zw6XXKSJckbHNMxn+zdB3guN2eOucSw2gBMnw== +ts-jest@^25.3.1: + version "25.5.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.5.1.tgz#2913afd08f28385d54f2f4e828be4d261f4337c7" + integrity sha512-kHEUlZMK8fn8vkxDjwbHlxXRB9dHYpyzqKIGDNxbzs+Rz+ssNDSDNusEK8Fk/sDd4xE6iKoQLfFkFVaskmTJyw== + dependencies: + bs-logger "0.x" + buffer-from "1.x" + fast-json-stable-stringify "2.x" + json5 "2.x" + lodash.memoize "4.x" + make-error "1.x" + micromatch "4.x" + mkdirp "0.x" + semver "6.x" + yargs-parser "18.x" + +ts-jest@^26.2.0: + version "26.2.0" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.2.0.tgz#7ec22faceb05ee1467fdb5265d1b33c27441f163" + integrity sha512-9+y2qwzXdAImgLSYLXAb/Rhq9+K4rbt0417b8ai987V60g2uoNWBBmMkYgutI7D8Zhu+IbCSHbBtrHxB9d7xyA== dependencies: + "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" fast-json-stable-stringify "2.x" @@ -13956,18 +13560,7 @@ ts-mock-imports@^1.2.6, ts-mock-imports@^1.3.0: resolved "https://registry.yarnpkg.com/ts-mock-imports/-/ts-mock-imports-1.3.0.tgz#ed9b743349f3c27346afe5b7454ffd2bcaa2302d" integrity sha512-cCrVcRYsp84eDvPict0ZZD/D7ppQ0/JSx4ve6aEU8DjlsaWRJWV6ADMovp2sCuh6pZcduLFoIYhKTDU2LARo7Q== -ts-node@^8.0.2: - version "8.8.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.8.2.tgz#0b39e690bee39ea5111513a9d2bcdc0bc121755f" - integrity sha512-duVj6BpSpUpD/oM4MfhO98ozgkp3Gt9qIp3jGxwU2DFvl/3IRaEAvbLa8G60uS7C77457e/m5TMowjedeRxI1Q== - dependencies: - arg "^4.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.6" - yn "3.1.1" - -ts-node@^8.10.2: +ts-node@^8.0.2, ts-node@^8.10.2: version "8.10.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== @@ -13994,14 +13587,14 @@ tsconfig-paths@^3.9.0: strip-bom "^3.0.0" tslib@^1.8.1, tslib@^1.9.0: - version "1.11.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" - integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== -tslib@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.0.tgz#18d13fc2dce04051e20f074cc8387fd8089ce4f3" - integrity sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g== +tslib@^2.0.0, tslib@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" + integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== tsutils@^3.17.1: version "3.17.1" @@ -14087,22 +13680,20 @@ typescript-json-schema@^0.42.0: typescript "^3.5.3" yargs "^14.0.0" -typescript@^3.3.3, typescript@^3.5.3, typescript@~3.8.3: +typescript@^3.3.3, typescript@^3.5.3, typescript@~3.9.7: + version "3.9.7" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" + integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== + +typescript@~3.8.3: version "3.8.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== -typescript@~3.9.6: - version "3.9.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a" - integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw== - uglify-js@^3.1.4: - version "3.9.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.9.1.tgz#a56a71c8caa2d36b5556cc1fd57df01ae3491539" - integrity sha512-JUPoL1jHsc9fOjVFHdQIhqEEJsQvfKDjlubcCilu8U26uZ73qOg8VsN8O1jbuei44ZPlwL7kmbAdM4tzaUvqnA== - dependencies: - commander "~2.20.3" + version "3.10.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.2.tgz#8cfa1209fd04199cc8a7f9930ddedb30b0f1912d" + integrity sha512-GXCYNwqoo0MbLARghYjxVBxDCnU0tLqN7IPLdHHbibCb1NI5zBkU2EPcy/GaVxc0BtTjqyGXJCINe6JMR2Dpow== uid-number@0.0.6: version "0.0.6" @@ -14201,12 +13792,10 @@ universal-user-agent@^4.0.0: dependencies: os-name "^3.1.0" -universal-user-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" - integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q== - dependencies: - os-name "^3.1.0" +universal-user-agent@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" + integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== universalify@^0.1.0: version "0.1.2" @@ -14328,25 +13917,20 @@ uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.2.0: - version "8.2.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.2.0.tgz#cb10dd6b118e2dada7d0cd9730ba7417c93d920e" - integrity sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q== +uuid@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.0.tgz#ab738085ca22dc9a8c92725e459b1d507df5d6ea" + integrity sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ== -v8-compile-cache@^2.0.0: +v8-compile-cache@^2.0.0, v8-compile-cache@^2.0.3: version "2.1.1" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== -v8-compile-cache@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" - integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== - v8-to-istanbul@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.3.tgz#22fe35709a64955f49a08a7c7c959f6520ad6f20" - integrity sha512-sAjOC+Kki6aJVbUOXJbcR0MnbfjvBzwKZazEJymA2IX49uoOdEdk+4fBq5cXgYgiyKtAyrrJNtBZdOeDIF+Fng== + 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" @@ -14376,6 +13960,11 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" +vandium-utils@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vandium-utils/-/vandium-utils-1.2.0.tgz#44735de4b7641a05de59ebe945f174e582db4f59" + integrity sha1-RHNd5LdkGgXeWevpRfF05YLbT1k= + vendors@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.4.tgz#e2b800a53e7a29b93506c3cf41100d16c4c4ad8e" @@ -14469,13 +14058,13 @@ whatwg-url@^7.0.0: webidl-conversions "^4.0.2" whatwg-url@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.1.0.tgz#c628acdcf45b82274ce7281ee31dd3c839791771" - integrity sha512-vEIkwNi9Hqt4TV9RdnaBPNt+E2Sgmo3gePebCRgZ1R7g6d23+53zCTnuB0amKI4AXq6VM8jj2DUAa0S1vjJxkw== + version "8.2.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.2.0.tgz#89383f80ea3888734d1cf29526c135d52e60166d" + integrity sha512-Sl4svq71j4kzaFD13uxkVl2AIsbj/xwp8NTM1VMhFRyNT1ZMTWaV6+Pva0fQs7y8+cAEPrDGfCAFLvJejhT79g== dependencies: lodash.sortby "^4.7.0" tr46 "^2.0.2" - webidl-conversions "^5.0.0" + webidl-conversions "^6.1.0" which-boxed-primitive@^1.0.1: version "1.0.1" @@ -14547,9 +14136,9 @@ window-size@^0.2.0: integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= windows-release@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.0.tgz#dce167e9f8be733f21c849ebd4d03fe66b29b9f0" - integrity sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ== + version "3.3.3" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999" + integrity sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg== dependencies: execa "^1.0.0" @@ -14668,12 +14257,7 @@ ws@^6.1.2, ws@^6.2.0: dependencies: async-limiter "~1.0.0" -ws@^7.0.0: - version "7.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" - integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== - -ws@^7.2.3: +ws@^7.0.0, ws@^7.2.3: version "7.3.1" resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" integrity sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA== @@ -14751,7 +14335,7 @@ 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== @@ -14768,7 +14352,7 @@ yapool@^1.0.0: resolved "https://registry.yarnpkg.com/yapool/-/yapool-1.0.0.tgz#f693f29a315b50d9a9da2646a7a6645c96985b6a" integrity sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o= -yargs-parser@18.x, yargs-parser@^18.1.1, yargs-parser@^18.1.2, yargs-parser@^18.1.3: +yargs-parser@18.x, yargs-parser@^18.1.2, yargs-parser@^18.1.3: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== @@ -14776,13 +14360,6 @@ yargs-parser@18.x, yargs-parser@^18.1.1, yargs-parser@^18.1.2, yargs-parser@^18. camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^10.0.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - yargs-parser@^13.0.0, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" @@ -14840,24 +14417,7 @@ yargs@^14.0.0, yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^15.0.2, yargs@^15.3.1: - version "15.3.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" - integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.1" - -yargs@^15.4.0: +yargs@^15.0.2, yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== From 1d99ad6b479b359c7d0e3874aa37a5864a5b0cc6 Mon Sep 17 00:00:00 2001 From: Ahmed Kamel Date: Wed, 26 Aug 2020 08:18:13 +0100 Subject: [PATCH 32/42] refactor(lambda): move log retention custom resource to logs (#9671) (#9808) move LogRetention construct definition from lambda to logs while refactoring it so it does not depend on lambda constructs this required reimplementing the functionality provided by lambda.SingletonFunction using CfnResource keep declared classes/interfaces in lambda for compatability while marking them as deprecated they should be removed in an upcoming breaking change for their current customers in lambda and rds Fixes #9671 --- packages/@aws-cdk/aws-lambda/lib/function.ts | 12 +- .../@aws-cdk/aws-lambda/lib/log-retention.ts | 109 ++---------- packages/@aws-cdk/aws-lambda/package.json | 7 +- packages/@aws-cdk/aws-logs/lib/index.ts | 1 + .../lib/log-retention-provider/index.ts | 0 .../@aws-cdk/aws-logs/lib/log-retention.ts | 166 ++++++++++++++++++ packages/@aws-cdk/aws-logs/package.json | 8 +- .../test/test.log-retention-provider.ts | 0 .../test/test.log-retention.ts | 11 +- packages/@aws-cdk/aws-rds/lib/cluster.ts | 3 +- packages/@aws-cdk/aws-rds/lib/instance.ts | 3 +- packages/@aws-cdk/aws-rds/package.json | 3 +- 12 files changed, 201 insertions(+), 122 deletions(-) rename packages/@aws-cdk/{aws-lambda => aws-logs}/lib/log-retention-provider/index.ts (100%) create mode 100644 packages/@aws-cdk/aws-logs/lib/log-retention.ts rename packages/@aws-cdk/{aws-lambda => aws-logs}/test/test.log-retention-provider.ts (100%) rename packages/@aws-cdk/{aws-lambda => aws-logs}/test/test.log-retention.ts (91%) diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index 04150a2d86144..97b70b700db3f 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -14,7 +14,7 @@ import { calculateFunctionHash, trimFromStart } from './function-hash'; import { Version, VersionOptions } from './lambda-version'; import { CfnFunction } from './lambda.generated'; import { ILayerVersion } from './layers'; -import { LogRetention, LogRetentionRetryOptions } from './log-retention'; +import { LogRetentionRetryOptions } from './log-retention'; import { Runtime } from './runtime'; /** @@ -633,13 +633,13 @@ export class Function extends FunctionBase { // Log retention if (props.logRetention) { - const logretention = new LogRetention(this, 'LogRetention', { + const logRetention = new logs.LogRetention(this, 'LogRetention', { logGroupName: `/aws/lambda/${this.functionName}`, retention: props.logRetention, role: props.logRetentionRole, - logRetentionRetryOptions: props.logRetentionRetryOptions, + logRetentionRetryOptions: props.logRetentionRetryOptions as logs.LogRetentionRetryOptions, }); - this._logGroup = logs.LogGroup.fromLogGroupArn(this, 'LogGroup', logretention.logGroupArn); + this._logGroup = logs.LogGroup.fromLogGroupArn(this, 'LogGroup', logRetention.logGroupArn); } props.code.bindToResource(resource); @@ -759,11 +759,11 @@ export class Function extends FunctionBase { */ public get logGroup(): logs.ILogGroup { if (!this._logGroup) { - const logretention = new LogRetention(this, 'LogRetention', { + const logRetention = new logs.LogRetention(this, 'LogRetention', { logGroupName: `/aws/lambda/${this.functionName}`, retention: logs.RetentionDays.INFINITE, }); - this._logGroup = logs.LogGroup.fromLogGroupArn(this, `${this.node.id}-LogGroup`, logretention.logGroupArn); + this._logGroup = logs.LogGroup.fromLogGroupArn(this, `${this.node.id}-LogGroup`, logRetention.logGroupArn); } return this._logGroup; } diff --git a/packages/@aws-cdk/aws-lambda/lib/log-retention.ts b/packages/@aws-cdk/aws-lambda/lib/log-retention.ts index 8e64262143a10..fed62dc2563ba 100644 --- a/packages/@aws-cdk/aws-lambda/lib/log-retention.ts +++ b/packages/@aws-cdk/aws-lambda/lib/log-retention.ts @@ -1,116 +1,31 @@ -import * as path from 'path'; -import * as iam from '@aws-cdk/aws-iam'; import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; -import { Code } from './code'; -import { Runtime } from './runtime'; -import { SingletonFunction } from './singleton-lambda'; /** - * Construction properties for a LogRetention. + * Retry options for all AWS API calls. + * + * @deprecated use `LogRetentionRetryOptions` from '@aws-cdk/aws-logs' instead */ -export interface LogRetentionProps { - /** - * The log group name. - */ - readonly logGroupName: string; - - /** - * The number of days log events are kept in CloudWatch Logs. - */ - readonly retention: logs.RetentionDays; - - /** - * The IAM role for the Lambda function associated with the custom resource. - * - * @default - A new role is created - */ - readonly role?: iam.IRole; - - /** - * Retry options for all AWS API calls. - * - * @default - AWS SDK default retry options - */ - readonly logRetentionRetryOptions?: LogRetentionRetryOptions; +export interface LogRetentionRetryOptions extends logs.LogRetentionRetryOptions { } /** - * Retry options for all AWS API calls. + * Construction properties for a LogRetention. + * + * @deprecated use `LogRetentionProps` from '@aws-cdk/aws-logs' instead */ -export interface LogRetentionRetryOptions { - /** - * The maximum amount of retries. - * - * @default 3 (AWS SDK default) - */ - readonly maxRetries?: number; - /** - * The base duration to use in the exponential backoff for operation retries. - * - * @default Duration.millis(100) (AWS SDK default) - */ - readonly base?: cdk.Duration; +export interface LogRetentionProps extends logs.LogRetentionProps { } /** * Creates a custom resource to control the retention policy of a CloudWatch Logs * log group. The log group is created if it doesn't already exist. The policy * is removed when `retentionDays` is `undefined` or equal to `Infinity`. + * + * @deprecated use `LogRetention` from '@aws-cdk/aws-logs' instead */ -export class LogRetention extends cdk.Construct { - - /** - * The ARN of the LogGroup. - */ - public readonly logGroupArn: string; - +export class LogRetention extends logs.LogRetention { constructor(scope: cdk.Construct, id: string, props: LogRetentionProps) { - super(scope, id); - - // Custom resource provider - const provider = new SingletonFunction(this, 'Provider', { - code: Code.fromAsset(path.join(__dirname, 'log-retention-provider')), - runtime: Runtime.NODEJS_10_X, - handler: 'index.handler', - uuid: 'aae0aa3c-5b4d-4f87-b02d-85b201efdd8a', - lambdaPurpose: 'LogRetention', - role: props.role, - }); - - // Duplicate statements will be deduplicated by `PolicyDocument` - provider.addToRolePolicy(new iam.PolicyStatement({ - actions: ['logs:PutRetentionPolicy', 'logs:DeleteRetentionPolicy'], - // We need '*' here because we will also put a retention policy on - // the log group of the provider function. Referencing it's name - // creates a CF circular dependency. - resources: ['*'], - })); - - // Need to use a CfnResource here to prevent lerna dependency cycles - // @aws-cdk/aws-cloudformation -> @aws-cdk/aws-lambda -> @aws-cdk/aws-cloudformation - const retryOptions = props.logRetentionRetryOptions; - const resource = new cdk.CfnResource(this, 'Resource', { - type: 'Custom::LogRetention', - properties: { - ServiceToken: provider.functionArn, - LogGroupName: props.logGroupName, - SdkRetry: retryOptions ? { - maxRetries: retryOptions.maxRetries, - base: retryOptions.base?.toMilliseconds(), - } : undefined, - RetentionInDays: props.retention === logs.RetentionDays.INFINITE ? undefined : props.retention, - }, - }); - - const logGroupName = resource.getAtt('LogGroupName').toString(); - // Append ':*' at the end of the ARN to match with how CloudFormation does this for LogGroup ARNs - // See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#aws-resource-logs-loggroup-return-values - this.logGroupArn = cdk.Stack.of(this).formatArn({ - service: 'logs', - resource: 'log-group', - resourceName: `${logGroupName}:*`, - sep: ':', - }); + super(scope, id, { ...props }); } } diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index a415a22928661..0e41ad7c9ba8a 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -71,17 +71,12 @@ "@types/aws-lambda": "^8.10.61", "@types/lodash": "^4.14.160", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.5", - "aws-sdk": "^2.739.0", - "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "lodash": "^4.17.20", - "nock": "^13.0.4", "nodeunit": "^0.11.3", - "pkglint": "0.0.0", - "sinon": "^9.0.3" + "pkglint": "0.0.0" }, "dependencies": { "@aws-cdk/aws-applicationautoscaling": "0.0.0", diff --git a/packages/@aws-cdk/aws-logs/lib/index.ts b/packages/@aws-cdk/aws-logs/lib/index.ts index bf626238843c3..5054715ffe52b 100644 --- a/packages/@aws-cdk/aws-logs/lib/index.ts +++ b/packages/@aws-cdk/aws-logs/lib/index.ts @@ -4,6 +4,7 @@ export * from './log-stream'; export * from './metric-filter'; export * from './pattern'; export * from './subscription-filter'; +export * from './log-retention'; // AWS::Logs CloudFormation Resources: export * from './logs.generated'; diff --git a/packages/@aws-cdk/aws-lambda/lib/log-retention-provider/index.ts b/packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts similarity index 100% rename from packages/@aws-cdk/aws-lambda/lib/log-retention-provider/index.ts rename to packages/@aws-cdk/aws-logs/lib/log-retention-provider/index.ts diff --git a/packages/@aws-cdk/aws-logs/lib/log-retention.ts b/packages/@aws-cdk/aws-logs/lib/log-retention.ts new file mode 100644 index 0000000000000..4a83d46ac01ff --- /dev/null +++ b/packages/@aws-cdk/aws-logs/lib/log-retention.ts @@ -0,0 +1,166 @@ +import * as path from 'path'; +import * as iam from '@aws-cdk/aws-iam'; +import * as s3_assets from '@aws-cdk/aws-s3-assets'; +import * as cdk from '@aws-cdk/core'; +import { RetentionDays } from './log-group'; + +/** + * Construction properties for a LogRetention. + */ +export interface LogRetentionProps { + /** + * The log group name. + */ + readonly logGroupName: string; + + /** + * The number of days log events are kept in CloudWatch Logs. + */ + readonly retention: RetentionDays; + + /** + * The IAM role for the Lambda function associated with the custom resource. + * + * @default - A new role is created + */ + readonly role?: iam.IRole; + + /** + * Retry options for all AWS API calls. + * + * @default - AWS SDK default retry options + */ + readonly logRetentionRetryOptions?: LogRetentionRetryOptions; +} + +/** + * Retry options for all AWS API calls. + */ +export interface LogRetentionRetryOptions { + /** + * The maximum amount of retries. + * + * @default 3 (AWS SDK default) + */ + readonly maxRetries?: number; + /** + * The base duration to use in the exponential backoff for operation retries. + * + * @default Duration.millis(100) (AWS SDK default) + */ + readonly base?: cdk.Duration; +} + +/** + * Creates a custom resource to control the retention policy of a CloudWatch Logs + * log group. The log group is created if it doesn't already exist. The policy + * is removed when `retentionDays` is `undefined` or equal to `Infinity`. + */ +export class LogRetention extends cdk.Construct { + + /** + * The ARN of the LogGroup. + */ + public readonly logGroupArn: string; + + constructor(scope: cdk.Construct, id: string, props: LogRetentionProps) { + super(scope, id); + + // Custom resource provider + const provider = this.ensureSingletonLogRetentionFunction(props); + + // Need to use a CfnResource here to prevent lerna dependency cycles + // @aws-cdk/aws-cloudformation -> @aws-cdk/aws-lambda -> @aws-cdk/aws-cloudformation + const retryOptions = props.logRetentionRetryOptions; + const resource = new cdk.CfnResource(this, 'Resource', { + type: 'Custom::LogRetention', + properties: { + ServiceToken: provider.functionArn, + LogGroupName: props.logGroupName, + SdkRetry: retryOptions ? { + maxRetries: retryOptions.maxRetries, + base: retryOptions.base?.toMilliseconds(), + } : undefined, + RetentionInDays: props.retention === RetentionDays.INFINITE ? undefined : props.retention, + }, + }); + + const logGroupName = resource.getAtt('LogGroupName').toString(); + // Append ':*' at the end of the ARN to match with how CloudFormation does this for LogGroup ARNs + // See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#aws-resource-logs-loggroup-return-values + this.logGroupArn = cdk.Stack.of(this).formatArn({ + service: 'logs', + resource: 'log-group', + resourceName: `${logGroupName}:*`, + sep: ':', + }); + } + + /** + * Helper method to ensure that only one instance of LogRetentionFunction resources are in the stack mimicking the + * behaviour of @aws-cdk/aws-lambda's SingletonFunction to prevent circular dependencies + */ + private ensureSingletonLogRetentionFunction(props: LogRetentionProps) { + const functionLogicalId = 'LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a'; + const existing = cdk.Stack.of(this).node.tryFindChild(functionLogicalId); + if (existing) { + return existing as LogRetentionFunction; + } + return new LogRetentionFunction(cdk.Stack.of(this), functionLogicalId, props); + } +} + +/** + * Private provider Lambda function to support the log retention custom resource. + */ +class LogRetentionFunction extends cdk.Construct { + public readonly functionArn: cdk.Reference; + + constructor(scope: cdk.Construct, id: string, props: LogRetentionProps) { + super(scope, id); + + // Code + const asset = new s3_assets.Asset(this, 'Code', { + path: path.join(__dirname, 'log-retention-provider'), + }); + + // Role + const role = props.role || new iam.Role(this, 'ServiceRole', { + assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), + managedPolicies: [iam.ManagedPolicy.fromAwsManagedPolicyName('service-role/AWSLambdaBasicExecutionRole')], + }); + // Duplicate statements will be deduplicated by `PolicyDocument` + role.addToPrincipalPolicy(new iam.PolicyStatement({ + actions: ['logs:PutRetentionPolicy', 'logs:DeleteRetentionPolicy'], + // We need '*' here because we will also put a retention policy on + // the log group of the provider function. Referencing its name + // creates a CF circular dependency. + resources: ['*'], + })); + + // Lambda function + const resource = new cdk.CfnResource(this, 'Resource', { + type: 'AWS::Lambda::Function', + properties: { + Handler: 'index.handler', + Runtime: 'nodejs10.x', + Code: { + S3Bucket: asset.s3BucketName, + S3Key: asset.s3ObjectKey, + }, + Role: role.roleArn, + }, + }); + this.functionArn = resource.getAtt('Arn'); + + // Function dependencies + role.node.children.forEach((child) => { + if (cdk.CfnResource.isCfnResource(child)) { + resource.addDependsOn(child); + } + if (cdk.Construct.isConstruct(child) && child.node.defaultChild && cdk.CfnResource.isCfnResource(child.node.defaultChild)) { + resource.addDependsOn(child.node.defaultChild); + } + }); + } +} diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 4741ab59ced02..567b0a3708dee 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -65,15 +65,20 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", + "aws-sdk": "^2.715.0", + "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", + "nock": "^13.0.2", "nodeunit": "^0.11.3", - "pkglint": "0.0.0" + "pkglint": "0.0.0", + "sinon": "^9.0.2" }, "dependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.0.4" }, @@ -81,6 +86,7 @@ "peerDependencies": { "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", + "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.0.4" }, diff --git a/packages/@aws-cdk/aws-lambda/test/test.log-retention-provider.ts b/packages/@aws-cdk/aws-logs/test/test.log-retention-provider.ts similarity index 100% rename from packages/@aws-cdk/aws-lambda/test/test.log-retention-provider.ts rename to packages/@aws-cdk/aws-logs/test/test.log-retention-provider.ts diff --git a/packages/@aws-cdk/aws-lambda/test/test.log-retention.ts b/packages/@aws-cdk/aws-logs/test/test.log-retention.ts similarity index 91% rename from packages/@aws-cdk/aws-lambda/test/test.log-retention.ts rename to packages/@aws-cdk/aws-logs/test/test.log-retention.ts index b06c6089982ba..c6139b11bd635 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.log-retention.ts +++ b/packages/@aws-cdk/aws-logs/test/test.log-retention.ts @@ -1,9 +1,8 @@ import { ABSENT, countResources, expect, haveResource } from '@aws-cdk/assert'; import * as iam from '@aws-cdk/aws-iam'; -import * as logs from '@aws-cdk/aws-logs'; import * as cdk from '@aws-cdk/core'; import { Test } from 'nodeunit'; -import { LogRetention } from '../lib/log-retention'; +import { LogRetention, RetentionDays } from '../lib'; /* eslint-disable quote-props */ @@ -15,7 +14,7 @@ export = { // WHEN new LogRetention(stack, 'MyLambda', { logGroupName: 'group', - retention: logs.RetentionDays.ONE_MONTH, + retention: RetentionDays.ONE_MONTH, }); // THEN @@ -64,7 +63,7 @@ export = { // WHEN new LogRetention(stack, 'MyLambda', { logGroupName: 'group', - retention: logs.RetentionDays.ONE_MONTH, + retention: RetentionDays.ONE_MONTH, role, }); @@ -100,7 +99,7 @@ export = { new LogRetention(stack, 'MyLambda', { logGroupName: 'group', - retention: logs.RetentionDays.INFINITE, + retention: RetentionDays.INFINITE, }); expect(stack).to(haveResource('Custom::LogRetention', { @@ -114,7 +113,7 @@ export = { const stack = new cdk.Stack(); const group = new LogRetention(stack, 'MyLambda', { logGroupName: 'group', - retention: logs.RetentionDays.ONE_MONTH, + retention: RetentionDays.ONE_MONTH, }); const logGroupArn = group.logGroupArn; diff --git a/packages/@aws-cdk/aws-rds/lib/cluster.ts b/packages/@aws-cdk/aws-rds/lib/cluster.ts index 56075630e6e79..1f8a0c090dbfe 100644 --- a/packages/@aws-cdk/aws-rds/lib/cluster.ts +++ b/packages/@aws-cdk/aws-rds/lib/cluster.ts @@ -1,7 +1,6 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import { IRole, ManagedPolicy, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; -import * as lambda from '@aws-cdk/aws-lambda'; import * as logs from '@aws-cdk/aws-logs'; import * as s3 from '@aws-cdk/aws-s3'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; @@ -629,7 +628,7 @@ export class DatabaseCluster extends DatabaseClusterBase { if (props.cloudwatchLogsRetention) { for (const log of props.cloudwatchLogsExports) { - new lambda.LogRetention(this, `LogRetention${log}`, { + new logs.LogRetention(this, `LogRetention${log}`, { logGroupName: `/aws/rds/cluster/${this.clusterIdentifier}/${log}`, retention: props.cloudwatchLogsRetention, role: props.cloudwatchLogsRetentionRole, diff --git a/packages/@aws-cdk/aws-rds/lib/instance.ts b/packages/@aws-cdk/aws-rds/lib/instance.ts index dd8c100ca925b..7135a84592fd5 100644 --- a/packages/@aws-cdk/aws-rds/lib/instance.ts +++ b/packages/@aws-cdk/aws-rds/lib/instance.ts @@ -2,7 +2,6 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as events from '@aws-cdk/aws-events'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; -import * as lambda from '@aws-cdk/aws-lambda'; import * as logs from '@aws-cdk/aws-logs'; import * as secretsmanager from '@aws-cdk/aws-secretsmanager'; import { CfnDeletionPolicy, Construct, Duration, IResource, Lazy, RemovalPolicy, Resource, SecretValue, Stack, Token } from '@aws-cdk/core'; @@ -594,7 +593,7 @@ abstract class DatabaseInstanceNew extends DatabaseInstanceBase implements IData protected setLogRetention() { if (this.cloudwatchLogsExports && this.cloudwatchLogsRetention) { for (const log of this.cloudwatchLogsExports) { - new lambda.LogRetention(this, `LogRetention${log}`, { + new logs.LogRetention(this, `LogRetention${log}`, { logGroupName: `/aws/rds/instance/${this.instanceIdentifier}/${log}`, retention: this.cloudwatchLogsRetention, role: this.cloudwatchLogsRetentionRole, diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index 16c5a4f10ad4f..7c65dfad99e40 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -65,6 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-events-targets": "0.0.0", + "@aws-cdk/aws-lambda": "0.0.0", "@types/nodeunit": "^0.0.31", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -78,7 +79,6 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", @@ -92,7 +92,6 @@ "@aws-cdk/aws-events": "0.0.0", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/aws-kms": "0.0.0", - "@aws-cdk/aws-lambda": "0.0.0", "@aws-cdk/aws-logs": "0.0.0", "@aws-cdk/aws-secretsmanager": "0.0.0", "@aws-cdk/core": "0.0.0", From e50a5a9f81e721990dbb9817afa581d290219601 Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Wed, 26 Aug 2020 14:49:46 +0100 Subject: [PATCH 33/42] chore: convert ELB and ELBv2 tests from nodeunit to jest (#9967) Part of my continuing campaign to update everything to Jest. There were a small enough number of tests to opt for full rewrites, rather than using the `nodeunitshim` helper. One little hack for the diff's sake. I added a dummy `describe('tests')` group to the top of each test to keep the indentation the same as with nodeunit. This fixed git's delta detection algorithm to only show actual changes, rather than showing the old and new files as completely unrelated. --- .../aws-elasticloadbalancing/.gitignore | 3 +- .../aws-elasticloadbalancing/.npmignore | 3 +- .../aws-elasticloadbalancing/jest.config.js | 2 + .../aws-elasticloadbalancing/package.json | 5 +- ...t.loadbalancer.ts => loadbalancer.test.ts} | 48 +- .../aws-elasticloadbalancingv2/.gitignore | 3 +- .../aws-elasticloadbalancingv2/.npmignore | 3 +- .../aws-elasticloadbalancingv2/jest.config.js | 2 + .../aws-elasticloadbalancingv2/package.json | 5 +- .../alb/{test.actions.ts => actions.test.ts} | 82 ++- .../{test.listener.ts => listener.test.ts} | 492 ++++++++---------- ...load-balancer.ts => load-balancer.test.ts} | 115 ++-- ...urity-groups.ts => security-group.test.ts} | 77 ++- ...t.target-group.ts => target-group.test.ts} | 44 +- .../nlb/{test.actions.ts => actions.test.ts} | 42 +- .../{test.listener.ts => listener.test.ts} | 156 +++--- ...load-balancer.ts => load-balancer.test.ts} | 145 +++--- ...t.target-group.ts => target-group.test.ts} | 57 +- 18 files changed, 528 insertions(+), 756 deletions(-) create mode 100644 packages/@aws-cdk/aws-elasticloadbalancing/jest.config.js rename packages/@aws-cdk/aws-elasticloadbalancing/test/{test.loadbalancer.ts => loadbalancer.test.ts} (88%) create mode 100644 packages/@aws-cdk/aws-elasticloadbalancingv2/jest.config.js rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/{test.actions.ts => actions.test.ts} (74%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/{test.listener.ts => listener.test.ts} (77%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/{test.load-balancer.ts => load-balancer.test.ts} (78%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/{test.security-groups.ts => security-group.test.ts} (86%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/{test.target-group.ts => target-group.test.ts} (73%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/{test.actions.ts => actions.test.ts} (68%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/{test.listener.ts => listener.test.ts} (76%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/{test.load-balancer.ts => load-balancer.test.ts} (78%) rename packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/{test.target-group.ts => target-group.test.ts} (62%) diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/.gitignore b/packages/@aws-cdk/aws-elasticloadbalancing/.gitignore index dcc1dc41e477f..f5370b5b8fc68 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/.gitignore +++ b/packages/@aws-cdk/aws-elasticloadbalancing/.gitignore @@ -14,5 +14,6 @@ nyc.config.js .LAST_PACKAGE *.snk !.eslintrc.js +!jest.config.js -junit.xml \ No newline at end of file +junit.xml diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore index 95a6e5fe5bb87..1a36d0617073e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +jest.config.js diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/jest.config.js b/packages/@aws-cdk/aws-elasticloadbalancing/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancing/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-elasticloadbalancing/package.json b/packages/@aws-cdk/aws-elasticloadbalancing/package.json index b48480d426c29..961544e9e33ab 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancing/package.json @@ -48,7 +48,8 @@ "compat": "cdk-compat" }, "cdk-build": { - "cloudformation": "AWS::ElasticLoadBalancing" + "cloudformation": "AWS::ElasticLoadBalancing", + "jest": true }, "keywords": [ "aws", @@ -64,11 +65,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-elasticloadbalancing/test/test.loadbalancer.ts b/packages/@aws-cdk/aws-elasticloadbalancing/test/loadbalancer.test.ts similarity index 88% rename from packages/@aws-cdk/aws-elasticloadbalancing/test/test.loadbalancer.ts rename to packages/@aws-cdk/aws-elasticloadbalancing/test/loadbalancer.test.ts index 9451e66fba146..873ee201c16b7 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/test/test.loadbalancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancing/test/loadbalancer.test.ts @@ -1,11 +1,10 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { Connections, Peer, SubnetType, Vpc } from '@aws-cdk/aws-ec2'; import { Duration, Stack } from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import { ILoadBalancerTarget, LoadBalancer, LoadBalancingProtocol } from '../lib'; -export = { - 'test specifying nonstandard port works'(test: Test) { +describe('tests', () => { + test('test specifying nonstandard port works', () => { const stack = new Stack(undefined, undefined, { env: { account: '1234', region: 'test' } }); stack.node.setContext('availability-zones:1234:test', ['test-1a', 'test-1b']); const vpc = new Vpc(stack, 'VCP'); @@ -27,11 +26,9 @@ export = { Protocol: 'http', }], })); + }); - test.done(); - }, - - 'add a health check'(test: Test) { + test('add a health check', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP'); @@ -57,11 +54,9 @@ export = { UnhealthyThreshold: '5', }, })); + }); - test.done(); - }, - - 'add a listener and load balancing target'(test: Test) { + test('add a listener and load balancing target', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP'); @@ -91,11 +86,9 @@ export = { }, ], })); + }); - test.done(); - }, - - 'enable cross zone load balancing'(test: Test) { + test('enable cross zone load balancing', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP'); @@ -110,11 +103,9 @@ export = { expect(stack).to(haveResource('AWS::ElasticLoadBalancing::LoadBalancer', { CrossZone: true, })); + }); - test.done(); - }, - - 'disable cross zone load balancing'(test: Test) { + test('disable cross zone load balancing', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP'); @@ -129,11 +120,9 @@ export = { expect(stack).to(haveResource('AWS::ElasticLoadBalancing::LoadBalancer', { CrossZone: false, })); + }); - test.done(); - }, - - 'cross zone load balancing enabled by default'(test: Test) { + test('cross zone load balancing enabled by default', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP'); @@ -147,11 +136,9 @@ export = { expect(stack).to(haveResource('AWS::ElasticLoadBalancing::LoadBalancer', { CrossZone: true, })); + }); - test.done(); - }, - - 'use specified subnet'(test: Test) { + test('use specified subnet', () => { // GIVEN const stack = new Stack(); const vpc = new Vpc(stack, 'VCP', { @@ -188,11 +175,8 @@ export = { subnetName: 'private1', }).subnetIds.map((subnetId: string) => stack.resolve(subnetId)), })); - - test.done(); - }, - -}; + }); +}); class FakeTarget implements ILoadBalancerTarget { public readonly connections = new Connections({ diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/.gitignore b/packages/@aws-cdk/aws-elasticloadbalancingv2/.gitignore index 018c65919d67c..266c0684c6844 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/.gitignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/.gitignore @@ -14,5 +14,6 @@ nyc.config.js .LAST_PACKAGE *.snk !.eslintrc.js +!jest.config.js -junit.xml \ No newline at end of file +junit.xml diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore index 95a6e5fe5bb87..1a36d0617073e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +jest.config.js diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/jest.config.js b/packages/@aws-cdk/aws-elasticloadbalancingv2/jest.config.js new file mode 100644 index 0000000000000..54e28beb9798b --- /dev/null +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/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-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 275c85044f388..1bf66849dfa9f 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -48,7 +48,8 @@ "compat": "cdk-compat" }, "cdk-build": { - "cloudformation": "AWS::ElasticLoadBalancingV2" + "cloudformation": "AWS::ElasticLoadBalancingV2", + "jest": true }, "keywords": [ "aws", @@ -64,11 +65,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-elasticloadbalancingv2/test/alb/test.actions.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/actions.test.ts similarity index 74% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.actions.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/actions.test.ts index 62a1c378bf067..719abb84dc44e 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.actions.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/actions.test.ts @@ -1,7 +1,6 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; let stack: cdk.Stack; @@ -9,18 +8,16 @@ let group1: elbv2.ApplicationTargetGroup; let group2: elbv2.ApplicationTargetGroup; let lb: elbv2.ApplicationLoadBalancer; -export = { - 'setUp'(cb: () => void) { - stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Stack'); - group1 = new elbv2.ApplicationTargetGroup(stack, 'TargetGroup1', { vpc, port: 80 }); - group2 = new elbv2.ApplicationTargetGroup(stack, 'TargetGroup2', { vpc, port: 80 }); - lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc }); +beforeEach(() => { + stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Stack'); + group1 = new elbv2.ApplicationTargetGroup(stack, 'TargetGroup1', { vpc, port: 80 }); + group2 = new elbv2.ApplicationTargetGroup(stack, 'TargetGroup2', { vpc, port: 80 }); + lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc }); +}); - cb(); - }, - - 'Forward action legacy rendering'(test: Test) { +describe('tests', () => { + test('Forward action legacy rendering', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -28,19 +25,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'TargetGroup1E5480F51' }, Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Forward to multiple targetgroups with an Action and stickiness'(test: Test) { + test('Forward to multiple targetgroups with an Action and stickiness', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -50,7 +45,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { ForwardConfig: { @@ -70,12 +65,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Weighted forward to multiple targetgroups with an Action'(test: Test) { + test('Weighted forward to multiple targetgroups with an Action', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -88,7 +81,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { ForwardConfig: { @@ -110,11 +103,10 @@ export = { Type: 'forward', }, ], - })); - test.done(); - }, + }); + }); - 'Chaining OIDC authentication action'(test: Test) { + test('Chaining OIDC authentication action', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -130,7 +122,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { AuthenticateOidcConfig: { @@ -150,12 +142,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Add default Action and add Action with conditions'(test: Test) { + test('Add default Action and add Action with conditions', () => { // GIVEN const listener = lb.addListener('Listener', { port: 80 }); @@ -171,19 +161,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Actions: [ { TargetGroupArn: { Ref: 'TargetGroup2D571E5D7' }, Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Add Action with multiple Conditions'(test: Test) { + test('Add Action with multiple Conditions', () => { // GIVEN const listener = lb.addListener('Listener', { port: 80 }); @@ -202,7 +190,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Actions: [ { TargetGroupArn: { Ref: 'TargetGroup2D571E5D7' }, @@ -227,8 +215,6 @@ export = { }, }, ], - })); - - test.done(); - }, -}; \ No newline at end of file + }); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts similarity index 77% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts index aa6345eac07cc..3e0ecb3ea740a 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/listener.test.ts @@ -1,13 +1,13 @@ -import { expect, haveResource, MatchStyle } from '@aws-cdk/assert'; +import { MatchStyle } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import { Metric } from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; import { FakeSelfRegisteringTarget } from '../helpers'; -export = { - 'Listener guesses protocol from port'(test: Test) { +describe('tests', () => { + test('Listener guesses protocol from port', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -21,14 +21,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'HTTPS', - })); - - test.done(); - }, + }); + }); - 'Listener guesses port from protocol'(test: Test) { + test('Listener guesses port from protocol', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -41,14 +39,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Port: 80, - })); - - test.done(); - }, + }); + }); - 'Listener default to open - IPv4'(test: Test) { + test('Listener default to open - IPv4', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -61,7 +57,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::EC2::SecurityGroup', { + expect(stack).toHaveResource('AWS::EC2::SecurityGroup', { SecurityGroupIngress: [ { Description: 'Allow from anyone on port 80', @@ -71,12 +67,10 @@ export = { ToPort: 80, }, ], - })); - - test.done(); - }, + }); + }); - 'Listener default to open - IPv4 and IPv6 (dualstack)'(test: Test) { + test('Listener default to open - IPv4 and IPv6 (dualstack)', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -89,7 +83,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::EC2::SecurityGroup', { + expect(stack).toHaveResource('AWS::EC2::SecurityGroup', { SecurityGroupIngress: [ { Description: 'Allow from anyone on port 80', @@ -106,12 +100,10 @@ export = { ToPort: 80, }, ], - })); - - test.done(); - }, + }); + }); - 'HTTPS listener requires certificate'(test: Test) { + test('HTTPS listener requires certificate', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -125,12 +117,10 @@ export = { // THEN const errors = cdk.ConstructNode.validate(stack.node); - test.deepEqual(errors.map(e => e.message), ['HTTPS Listener needs at least one certificate (call addCertificates)']); - - test.done(); - }, + expect(errors.map(e => e.message)).toEqual(['HTTPS Listener needs at least one certificate (call addCertificates)']); + }); - 'HTTPS listener can add certificate after construction'(test: Test) { + test('HTTPS listener can add certificate after construction', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -145,16 +135,14 @@ export = { listener.addCertificateArns('Arns', ['cert']); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Certificates: [ { CertificateArn: 'cert' }, ], - })); - - test.done(); - }, + }); + }); - 'Can configure targetType on TargetGroups'(test: Test) { + test('Can configure targetType on TargetGroups', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -167,14 +155,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { TargetType: 'ip', - })); - - test.done(); - }, + }); + }); - 'Can configure name on TargetGroups'(test: Test) { + test('Can configure name on TargetGroups', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -187,14 +173,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { Name: 'foo', - })); - - test.done(); - }, + }); + }); - 'Can add target groups with and without conditions'(test: Test) { + test('Can add target groups with and without conditions', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -213,15 +197,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'TargetGroup3D7CD9B8' }, Type: 'forward', }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 10, Conditions: [ { @@ -235,12 +219,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Can implicitly create target groups with and without conditions'(test: Test) { + test('Can implicitly create target groups with and without conditions', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -260,43 +242,41 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'LBListenerTargetsGroup76EF81E8' }, Type: 'forward', }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { VpcId: { Ref: 'Stack8A423254' }, Port: 80, Protocol: 'HTTP', Targets: [ { Id: 'i-12345' }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Actions: [ { TargetGroupArn: { Ref: 'LBListenerWithPathGroupE889F9E5' }, Type: 'forward', }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { VpcId: { Ref: 'Stack8A423254' }, Port: 80, Protocol: 'HTTP', Targets: [ { Id: 'i-5678' }, ], - })); - - test.done(); - }, + }); + }); - 'Add certificate to constructed listener'(test: Test) { + test('Add certificate to constructed listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -308,16 +288,14 @@ export = { listener.addTargets('Targets', { port: 8080, targets: [new elbv2.IpTarget('1.2.3.4')] }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Certificates: [ { CertificateArn: 'cert' }, ], - })); - - test.done(); - }, + }); + }); - 'Add certificate to imported listener'(test: Test) { + test('Add certificate to imported listener', () => { // GIVEN const stack2 = new cdk.Stack(); const listener2 = elbv2.ApplicationListener.fromApplicationListenerAttributes(stack2, 'Listener', { @@ -330,16 +308,14 @@ export = { listener2.addCertificateArns('Arns', ['cert']); // THEN - expect(stack2).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + expect(stack2).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { Certificates: [ { CertificateArn: 'cert' }, ], - })); - - test.done(); - }, + }); + }); - 'Enable stickiness for targets'(test: Test) { + test('Enable stickiness for targets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -354,7 +330,7 @@ export = { group.enableCookieStickiness(cdk.Duration.hours(1)); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { TargetGroupAttributes: [ { Key: 'stickiness.enabled', @@ -369,12 +345,10 @@ export = { Value: '3600', }, ], - })); - - test.done(); - }, + }); + }); - 'Enable health check for targets'(test: Test) { + test('Enable health check for targets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -394,17 +368,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { UnhealthyThresholdCount: 3, HealthCheckIntervalSeconds: 30, HealthCheckPath: '/test', HealthCheckTimeoutSeconds: 3600, - })); - - test.done(); - }, + }); + }); - 'validation error if invalid health check protocol'(test: Test) { + test('validation error if invalid health check protocol', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -427,12 +399,10 @@ export = { // THEN const validationErrors: string[] = (group as any).validate(); - test.deepEqual(validationErrors, ["Health check protocol 'TCP' is not supported. Must be one of [HTTP, HTTPS]"]); + expect(validationErrors).toEqual(["Health check protocol 'TCP' is not supported. Must be one of [HTTP, HTTPS]"]); + }); - test.done(); - }, - - 'Can call addTargetGroups on imported listener'(test: Test) { + test('Can call addTargetGroups on imported listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -450,7 +420,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { ListenerArn: 'ieks', Priority: 30, Actions: [ @@ -459,12 +429,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Can call addTargetGroups on imported listener with conditions prop'(test: Test) { + test('Can call addTargetGroups on imported listener with conditions prop', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -482,7 +450,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { ListenerArn: 'ieks', Priority: 30, Actions: [ @@ -491,12 +459,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Can depend on eventual listener via TargetGroup'(test: Test) { + test('Can depend on eventual listener via TargetGroup', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -512,7 +478,7 @@ export = { }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { SomeResource: { Type: 'Test::Resource', @@ -520,11 +486,9 @@ export = { }, }, }, MatchStyle.SUPERSET); + }); - test.done(); - }, - - 'Exercise metrics'(test: Test) { + test('Exercise metrics', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -547,10 +511,10 @@ export = { metrics.push(group.metricTargetTLSNegotiationErrorCount()); for (const metric of metrics) { - test.equal('AWS/ApplicationELB', metric.namespace); + expect(metric.namespace).toEqual('AWS/ApplicationELB'); const loadBalancerArn = { Ref: 'LBSomeListenerCA01F1A0' }; - test.deepEqual(stack.resolve(metric.dimensions), { + expect(stack.resolve(metric.dimensions)).toEqual({ TargetGroup: { 'Fn::GetAtt': ['TargetGroup3D7CD9B8', 'TargetGroupFullName'] }, LoadBalancer: { 'Fn::Join': @@ -563,11 +527,9 @@ export = { }, }); } + }); - test.done(); - }, - - 'Can add dependency on ListenerRule via TargetGroup'(test: Test) { + test('Can add dependency on ListenerRule via TargetGroup', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -589,7 +551,7 @@ export = { }); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { SomeResource: { Type: 'Test::Resource', @@ -597,11 +559,9 @@ export = { }, }, }, MatchStyle.SUPERSET); + }); - test.done(); - }, - - 'Can add fixed responses'(test: Test) { + test('Can add fixed responses', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -625,7 +585,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { FixedResponseConfig: { @@ -636,9 +596,9 @@ export = { Type: 'fixed-response', }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Actions: [ { FixedResponseConfig: { @@ -647,12 +607,10 @@ export = { Type: 'fixed-response', }, ], - })); - - test.done(); - }, + }); + }); - 'Can add redirect responses'(test: Test) { + test('Can add redirect responses', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -677,7 +635,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { RedirectConfig: { @@ -688,9 +646,9 @@ export = { Type: 'redirect', }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Actions: [ { RedirectConfig: { @@ -700,12 +658,10 @@ export = { Type: 'redirect', }, ], - })); - - test.done(); - }, + }); + }); - 'Can configure deregistration_delay for targets'(test: Test) { + test('Can configure deregistration_delay for targets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -718,21 +674,19 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { TargetGroupAttributes: [ { Key: 'deregistration_delay.timeout_seconds', Value: '30', }, ], - })); - - test.done(); - }, + }); + }); - 'Throws with bad fixed responses': { + describe('Throws with bad fixed responses', () => { - 'status code'(test: Test) { + test('status code', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -744,14 +698,12 @@ export = { }); // THEN - test.throws(() => listener.addFixedResponse('Default', { + expect(() => listener.addFixedResponse('Default', { statusCode: '301', - }), /`statusCode`/); - - test.done(); - }, + })).toThrow(/`statusCode`/); + }); - 'message body'(test: Test) { + test('message body', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -763,18 +715,16 @@ export = { }); // THEN - test.throws(() => listener.addFixedResponse('Default', { + expect(() => listener.addFixedResponse('Default', { messageBody: 'a'.repeat(1025), statusCode: '500', - }), /`messageBody`/); - - test.done(); - }, - }, + })).toThrow(/`messageBody`/); + }); + }); - 'Throws with bad redirect responses': { + describe('Throws with bad redirect responses', () => { - 'status code'(test: Test) { + test('status code', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -786,14 +736,12 @@ export = { }); // THEN - test.throws(() => listener.addRedirectResponse('Default', { + expect(() => listener.addRedirectResponse('Default', { statusCode: '301', - }), /`statusCode`/); - - test.done(); - }, + })).toThrow(/`statusCode`/); + }); - 'protocol'(test: Test) { + test('protocol', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -805,16 +753,14 @@ export = { }); // THEN - test.throws(() => listener.addRedirectResponse('Default', { + expect(() => listener.addRedirectResponse('Default', { protocol: 'tcp', statusCode: 'HTTP_301', - }), /`protocol`/); - - test.done(); - }, - }, + })).toThrow(/`protocol`/); + }); + }); - 'Throws when specifying both target groups and fixed reponse'(test: Test) { + test('Throws when specifying both target groups and fixed reponse', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -826,7 +772,7 @@ export = { }); // THEN - test.throws(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { + expect(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { listener, priority: 10, pathPattern: '/hello', @@ -834,12 +780,10 @@ export = { fixedResponse: { statusCode: '500', }, - }), /'targetGroups,fixedResponse'.*/); + })).toThrow(/'targetGroups,fixedResponse'.*/); + }); - test.done(); - }, - - 'Throws when specifying priority 0'(test: Test) { + test('Throws when specifying priority 0', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -851,19 +795,17 @@ export = { }); // THEN - test.throws(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { + expect(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { listener, priority: 0, pathPattern: '/hello', fixedResponse: { statusCode: '500', }, - }), Error, 'Priority must have value greater than or equal to 1'); - - test.done(); - }, + })).toThrowError('Priority must have value greater than or equal to 1'); + }); - 'Throws when specifying both target groups and redirect reponse'(test: Test) { + test('Throws when specifying both target groups and redirect reponse', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -875,7 +817,7 @@ export = { }); // THEN - test.throws(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { + expect(() => new elbv2.ApplicationListenerRule(stack, 'Rule', { listener, priority: 10, pathPattern: '/hello', @@ -883,9 +825,9 @@ export = { redirectResponse: { statusCode: 'HTTP_301', }, - }), /'targetGroups,redirectResponse'.*/); + })).toThrow(/'targetGroups,redirectResponse'.*/); - test.throws(() => new elbv2.ApplicationListenerRule(stack, 'Rule2', { + expect(() => new elbv2.ApplicationListenerRule(stack, 'Rule2', { listener, priority: 10, pathPattern: '/hello', @@ -896,12 +838,10 @@ export = { redirectResponse: { statusCode: 'HTTP_301', }, - }), /'targetGroups,fixedResponse,redirectResponse'.*/); - - test.done(); - }, + })).toThrow(/'targetGroups,fixedResponse,redirectResponse'.*/); + }); - 'Imported listener with imported security group and allowAllOutbound set to false'(test: Test) { + test('Imported listener with imported security group and allowAllOutbound set to false', () => { // GIVEN const stack = new cdk.Stack(); const listener = elbv2.ApplicationListener.fromApplicationListenerAttributes(stack, 'Listener', { @@ -916,14 +856,12 @@ export = { listener.connections.allowToAnyIpv4(ec2.Port.tcp(443)); // THEN - expect(stack).to(haveResource('AWS::EC2::SecurityGroupEgress', { + expect(stack).toHaveResource('AWS::EC2::SecurityGroupEgress', { GroupId: 'security-group-id', - })); - - test.done(); - }, + }); + }); - 'Can pass multiple certificate arns to application listener constructor'(test: Test) { + test('Can pass multiple certificate arns to application listener constructor', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -937,18 +875,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'HTTPS', - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { Certificates: [{ CertificateArn: 'cert2' }], - })); - - test.done(); - }, + }); + }); - 'Can use certificate wrapper class'(test: Test) { + test('Can use certificate wrapper class', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -962,18 +898,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'HTTPS', - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { Certificates: [{ CertificateArn: 'cert2' }], - })); - - test.done(); - }, + }); + }); - 'Can add additional certificates via addCertficateArns to application listener'(test: Test) { + test('Can add additional certificates via addCertficateArns to application listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -989,22 +923,20 @@ export = { listener.addCertificateArns('ListenerCertificateX', ['cert3']); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'HTTPS', - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { Certificates: [{ CertificateArn: 'cert2' }], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerCertificate', { Certificates: [{ CertificateArn: 'cert3' }], - })); - - test.done(); - }, + }); + }); - 'Can add multiple path patterns to listener rule'(test: Test) { + test('Can add multiple path patterns to listener rule', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1023,7 +955,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 10, Conditions: [ { @@ -1031,12 +963,10 @@ export = { Values: ['/test/path/1', '/test/path/2'], }, ], - })); - - test.done(); - }, + }); + }); - 'Cannot add pathPattern and pathPatterns to listener rule'(test: Test) { + test('Cannot add pathPattern and pathPatterns to listener rule', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1050,16 +980,14 @@ export = { }); // THEN - test.throws(() => listener.addTargets('Target1', { + expect(() => listener.addTargets('Target1', { priority: 10, pathPatterns: ['/test/path/1', '/test/path/2'], pathPattern: '/test/path/3', - }), Error, 'At least one of \'hostHeader\', \'pathPattern\' or \'pathPatterns\' is required when defining a load balancing rule.'); + })).toThrowError('Both `pathPatterns` and `pathPattern` are specified, specify only one'); + }); - test.done(); - }, - - 'Add additonal condition to listener rule'(test: Test) { + test('Add additonal condition to listener rule', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1090,7 +1018,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 10, Conditions: [ { @@ -1107,9 +1035,9 @@ export = { }, }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 20, Conditions: [ { @@ -1119,12 +1047,10 @@ export = { }, }, ], - })); - - test.done(); - }, + }); + }); - 'Add multiple additonal condition to listener rule'(test: Test) { + test('Add multiple additonal condition to listener rule', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1173,7 +1099,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 10, Conditions: [ { @@ -1203,9 +1129,9 @@ export = { }, }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 20, Conditions: [ { @@ -1222,9 +1148,9 @@ export = { }, }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 30, Conditions: [ { @@ -1240,9 +1166,9 @@ export = { }, }, ], - })); + }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 40, Conditions: [ { @@ -1252,12 +1178,10 @@ export = { }, }, ], - })); - - test.done(); - }, + }); + }); - 'Can exist together legacy style conditions and modan style conditions'(test: Test) { + test('Can exist together legacy style conditions and modan style conditions', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1282,7 +1206,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 10, Conditions: [ { @@ -1300,12 +1224,10 @@ export = { }, }, ], - })); - - test.done(); - }, + }); + }); - 'Add condition to imported application listener'(test: Test) { + test('Add condition to imported application listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1324,7 +1246,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::ListenerRule', { Priority: 1, Conditions: [ { @@ -1332,12 +1254,10 @@ export = { Values: ['/path1', '/path2'], }, ], - })); - - test.done(); - }, + }); + }); - 'not allowed to combine action specifiers when instantiating a Rule directly'(test: Test) { + test('not allowed to combine action specifiers when instantiating a Rule directly', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1348,26 +1268,24 @@ export = { const baseProps = { listener, priority: 1, pathPatterns: ['/path1', '/path2'] }; // WHEN - test.throws(() => { + expect(() => { new elbv2.ApplicationListenerRule(stack, 'Rule1', { ...baseProps, fixedResponse: { statusCode: '200' }, action: elbv2.ListenerAction.fixedResponse(200), }); - }, /specify only one/); + }).toThrow(/specify only one/); - test.throws(() => { + expect(() => { new elbv2.ApplicationListenerRule(stack, 'Rule2', { ...baseProps, targetGroups: [group], action: elbv2.ListenerAction.fixedResponse(200), }); - }, /specify only one/); + }).toThrow(/specify only one/); + }); - test.done(); - }, - - 'not allowed to specify defaultTargetGroups and defaultAction together'(test: Test) { + test('not allowed to specify defaultTargetGroups and defaultAction together', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -1375,17 +1293,15 @@ export = { const lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc }); // WHEN - test.throws(() => { + expect(() => { lb.addListener('Listener1', { port: 80, defaultTargetGroups: [group], defaultAction: elbv2.ListenerAction.fixedResponse(200), }); - }, /Specify at most one/); - - test.done(); - }, -}; + }).toThrow(/Specify at most one/); + }); +}); class ResourceWithLBDependency extends cdk.CfnResource { constructor(scope: cdk.Construct, id: string, targetGroup: elbv2.ITargetGroup) { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts similarity index 78% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts index 5d623fbc5dce4..8627f2deea272 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/load-balancer.test.ts @@ -1,13 +1,13 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import { ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import { Metric } from '@aws-cdk/aws-cloudwatch'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; -export = { - 'Trivial construction: internet facing'(test: Test) { +describe('tests', () => { + test('Trivial construction: internet facing', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -19,19 +19,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internet-facing', Subnets: [ { Ref: 'StackPublicSubnet1Subnet0AD81D22' }, { Ref: 'StackPublicSubnet2Subnet3C7D2288' }, ], Type: 'application', - })); - - test.done(); - }, + }); + }); - 'internet facing load balancer has dependency on IGW'(test: Test) { + test('internet facing load balancer has dependency on IGW', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -43,17 +41,15 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { DependsOn: [ 'StackPublicSubnet1DefaultRoute16154E3D', 'StackPublicSubnet2DefaultRoute0319539B', ], - }, ResourcePart.CompleteDefinition)); - - test.done(); - }, + }, ResourcePart.CompleteDefinition); + }); - 'Trivial construction: internal'(test: Test) { + test('Trivial construction: internal', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -62,19 +58,17 @@ export = { new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'StackPrivateSubnet1Subnet47AC2BC7' }, { Ref: 'StackPrivateSubnet2SubnetA2F8EDD8' }, ], Type: 'application', - })); - - test.done(); - }, + }); + }); - 'Attributes'(test: Test) { + test('Attributes', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -88,7 +82,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'deletion_protection.enabled', @@ -103,12 +97,10 @@ export = { Value: '1000', }, ], - })); - - test.done(); - }, + }); + }); - 'Access logging'(test: Test) { + test('Access logging', () => { // GIVEN const stack = new cdk.Stack(undefined, undefined, { env: { region: 'us-east-1' } }); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -121,7 +113,7 @@ export = { // THEN // verify that the LB attributes reference the bucket - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'access_logs.s3.enabled', @@ -132,10 +124,10 @@ export = { Value: { Ref: 'AccessLoggingBucketA6D88F29' }, }, ], - })); + }); // verify the bucket policy allows the ALB to put objects in the bucket - expect(stack).to(haveResource('AWS::S3::BucketPolicy', { + expect(stack).toHaveResource('AWS::S3::BucketPolicy', { PolicyDocument: { Version: '2012-10-17', Statement: [ @@ -150,17 +142,15 @@ export = { }, ], }, - })); + }); // verify the ALB depends on the bucket *and* the bucket policy - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { DependsOn: ['AccessLoggingBucketPolicy700D7CC6', 'AccessLoggingBucketA6D88F29'], - }, ResourcePart.CompleteDefinition)); + }, ResourcePart.CompleteDefinition); + }); - test.done(); - }, - - 'access logging with prefix'(test: Test) { + test('access logging with prefix', () => { // GIVEN const stack = new cdk.Stack(undefined, undefined, { env: { region: 'us-east-1' } }); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -172,7 +162,7 @@ export = { // THEN // verify that the LB attributes reference the bucket - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'access_logs.s3.enabled', @@ -187,10 +177,10 @@ export = { Value: 'prefix-of-access-logs', }, ], - })); + }); // verify the bucket policy allows the ALB to put objects in the bucket - expect(stack).to(haveResource('AWS::S3::BucketPolicy', { + expect(stack).toHaveResource('AWS::S3::BucketPolicy', { PolicyDocument: { Version: '2012-10-17', Statement: [ @@ -205,12 +195,10 @@ export = { }, ], }, - })); - - test.done(); - }, + }); + }); - 'Exercise metrics'(test: Test) { + test('Exercise metrics', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -242,16 +230,14 @@ export = { metrics.push(lb.metricTargetTLSNegotiationErrorCount()); for (const metric of metrics) { - test.equal('AWS/ApplicationELB', metric.namespace); - test.deepEqual(stack.resolve(metric.dimensions), { + expect(metric.namespace).toEqual('AWS/ApplicationELB'); + expect(stack.resolve(metric.dimensions)).toEqual({ LoadBalancer: { 'Fn::GetAtt': ['LB8A12904C', 'LoadBalancerFullName'] }, }); } + }); - test.done(); - }, - - 'loadBalancerName'(test: Test) { + test('loadBalancerName', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -263,13 +249,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Name: 'myLoadBalancer', - })); - test.done(); - }, + }); + }); - 'imported load balancer with no vpc throws error when calling addTargets'(test: Test) { + test('imported load balancer with no vpc throws error when calling addTargets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -285,12 +270,10 @@ export = { // WHEN const listener = alb.addListener('Listener', { port: 80 }); - test.throws(() => listener.addTargets('Targets', { port: 8080 })); + expect(() => listener.addTargets('Targets', { port: 8080 })).toThrow(); + }); - test.done(); - }, - - 'imported load balancer with vpc does not throw error when calling addTargets'(test: Test) { + test('imported load balancer with vpc does not throw error when calling addTargets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -307,8 +290,6 @@ export = { // WHEN const listener = alb.addListener('Listener', { port: 80 }); - test.doesNotThrow(() => listener.addTargets('Targets', { port: 8080 })); - - test.done(); - }, -}; + expect(() => listener.addTargets('Targets', { port: 8080 })).not.toThrow(); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/security-group.test.ts similarity index 86% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/security-group.test.ts index f12377b5a5ab5..e4d45eb609335 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.security-groups.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/security-group.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; import { FakeSelfRegisteringTarget } from '../helpers'; -export = { - 'security groups are automatically opened bidi for default rule'(test: Test) { +describe('tests', () => { + test('security groups are automatically opened bidi for default rule', () => { // GIVEN const fixture = new TestFixture(); const target = new FakeSelfRegisteringTarget(fixture.stack, 'Target', fixture.vpc); @@ -19,11 +18,9 @@ export = { // THEN expectSameStackSGRules(fixture.stack); + }); - test.done(); - }, - - 'security groups are automatically opened bidi for additional rule'(test: Test) { + test('security groups are automatically opened bidi for additional rule', () => { // GIVEN const fixture = new TestFixture(); const target1 = new FakeSelfRegisteringTarget(fixture.stack, 'DefaultTarget', fixture.vpc); @@ -47,11 +44,9 @@ export = { // THEN expectSameStackSGRules(fixture.stack); + }); - test.done(); - }, - - 'adding the same targets twice also works'(test: Test) { + test('adding the same targets twice also works', () => { // GIVEN const fixture = new TestFixture(); const target = new FakeSelfRegisteringTarget(fixture.stack, 'Target', fixture.vpc); @@ -74,11 +69,9 @@ export = { // THEN expectSameStackSGRules(fixture.stack); + }); - test.done(); - }, - - 'same result if target is added to group after assigning to listener'(test: Test) { + test('same result if target is added to group after assigning to listener', () => { // GIVEN const fixture = new TestFixture(); const group = new elbv2.ApplicationTargetGroup(fixture.stack, 'TargetGroup', { @@ -95,11 +88,9 @@ export = { // THEN expectSameStackSGRules(fixture.stack); + }); - test.done(); - }, - - 'ingress is added to child stack SG instead of parent stack'(test: Test) { + test('ingress is added to child stack SG instead of parent stack', () => { // GIVEN const fixture = new TestFixture(true); @@ -132,11 +123,9 @@ export = { // THEN expectSameStackSGRules(fixture.stack); expectedImportedSGRules(childStack); + }); - test.done(); - }, - - 'SG peering works on exported/imported load balancer'(test: Test) { + test('SG peering works on exported/imported load balancer', () => { // GIVEN const fixture = new TestFixture(false); const stack2 = new cdk.Stack(fixture.app, 'stack2'); @@ -159,11 +148,9 @@ export = { // THEN expectedImportedSGRules(stack2); + }); - test.done(); - }, - - 'SG peering works on exported/imported listener'(test: Test) { + test('SG peering works on exported/imported listener', () => { // GIVEN const fixture = new TestFixture(); const stack2 = new cdk.Stack(fixture.app, 'stack2'); @@ -192,11 +179,9 @@ export = { // THEN expectedImportedSGRules(stack2); + }); - test.done(); - }, - - 'default port peering works on constructed listener'(test: Test) { + test('default port peering works on constructed listener', () => { // GIVEN const fixture = new TestFixture(); fixture.listener.addTargets('Default', { port: 8080, targets: [new elbv2.InstanceTarget('i-12345')] }); @@ -205,7 +190,7 @@ export = { fixture.listener.connections.allowDefaultPortFromAnyIpv4('Open to the world'); // THEN - expect(fixture.stack).to(haveResource('AWS::EC2::SecurityGroup', { + expect(fixture.stack).toHaveResource('AWS::EC2::SecurityGroup', { SecurityGroupIngress: [ { CidrIp: '0.0.0.0/0', @@ -215,12 +200,10 @@ export = { ToPort: 80, }, ], - })); - - test.done(); - }, + }); + }); - 'default port peering works on imported listener'(test: Test) { + test('default port peering works on imported listener', () => { // GIVEN const stack2 = new cdk.Stack(); @@ -233,18 +216,16 @@ export = { listener2.connections.allowDefaultPortFromAnyIpv4('Open to the world'); // THEN - expect(stack2).to(haveResource('AWS::EC2::SecurityGroupIngress', { + expect(stack2).toHaveResource('AWS::EC2::SecurityGroupIngress', { CidrIp: '0.0.0.0/0', Description: 'Open to the world', IpProtocol: 'tcp', FromPort: 8080, ToPort: 8080, GroupId: 'imported-security-group-id', - })); - - test.done(); - }, -}; + }); + }); +}); const LB_SECURITY_GROUP = { 'Fn::GetAtt': ['LBSecurityGroup8A41EA2B', 'GroupId'] }; const IMPORTED_LB_SECURITY_GROUP = { 'Fn::ImportValue': 'Stack:ExportsOutputFnGetAttLBSecurityGroup8A41EA2BGroupId851EE1F6' }; @@ -258,22 +239,22 @@ function expectedImportedSGRules(stack: cdk.Stack) { } function expectSGRules(stack: cdk.Stack, lbGroup: any) { - expect(stack).to(haveResource('AWS::EC2::SecurityGroupEgress', { + expect(stack).toHaveResource('AWS::EC2::SecurityGroupEgress', { GroupId: lbGroup, IpProtocol: 'tcp', Description: 'Load balancer to target', DestinationSecurityGroupId: { 'Fn::GetAtt': ['TargetSGDB98152D', 'GroupId'] }, FromPort: 8008, ToPort: 8008, - })); - expect(stack).to(haveResource('AWS::EC2::SecurityGroupIngress', { + }); + expect(stack).toHaveResource('AWS::EC2::SecurityGroupIngress', { IpProtocol: 'tcp', Description: 'Load balancer to target', FromPort: 8008, GroupId: { 'Fn::GetAtt': ['TargetSGDB98152D', 'GroupId'] }, SourceSecurityGroupId: lbGroup, ToPort: 8008, - })); + }); } class TestFixture { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts similarity index 73% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.target-group.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts index cdea234295273..1d8df0a706d9c 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/test.target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/alb/target-group.test.ts @@ -1,12 +1,11 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; import { FakeSelfRegisteringTarget } from '../helpers'; -export = { - 'Empty target Group without type still requires a VPC'(test: Test) { +describe('tests', () => { + test('Empty target Group without type still requires a VPC', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'Stack'); @@ -15,14 +14,12 @@ export = { new elbv2.ApplicationTargetGroup(stack, 'LB', {}); // THEN - test.throws(() => { + expect(() => { app.synth(); - }, /'vpc' is required for a non-Lambda TargetGroup/); + }).toThrow(/'vpc' is required for a non-Lambda TargetGroup/); + }); - test.done(); - }, - - 'Can add self-registering target to imported TargetGroup'(test: Test) { + test('Can add self-registering target to imported TargetGroup', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'Stack'); @@ -33,12 +30,9 @@ export = { targetGroupArn: 'arn', }); tg.addTarget(new FakeSelfRegisteringTarget(stack, 'Target', vpc)); + }); - // THEN - test.done(); - }, - - 'Cannot add direct target to imported TargetGroup'(test: Test) { + test('Cannot add direct target to imported TargetGroup', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'Stack'); @@ -47,14 +41,12 @@ export = { }); // WHEN - test.throws(() => { + expect(() => { tg.addTarget(new elbv2.InstanceTarget('i-1234')); - }, /Cannot add a non-self registering target to an imported TargetGroup/); + }).toThrow(/Cannot add a non-self registering target to an imported TargetGroup/); + }); - test.done(); - }, - - 'HealthCheck fields set if provided'(test: Test) { + test('HealthCheck fields set if provided', () => { // GIVEN const app = new cdk.App(); const stack = new cdk.Stack(app, 'Stack'); @@ -83,7 +75,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { HealthCheckEnabled: true, HealthCheckIntervalSeconds: 255, HealthCheckPath: '/arbitrary', @@ -94,8 +86,6 @@ export = { }, Port: 80, UnhealthyThresholdCount: 27, - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.actions.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/actions.test.ts similarity index 68% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.actions.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/actions.test.ts index f093cf1df2548..cfb9b67e717ec 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.actions.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/actions.test.ts @@ -1,7 +1,6 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; let stack: cdk.Stack; @@ -9,18 +8,16 @@ let group1: elbv2.NetworkTargetGroup; let group2: elbv2.NetworkTargetGroup; let lb: elbv2.NetworkLoadBalancer; -export = { - 'setUp'(cb: () => void) { - stack = new cdk.Stack(); - const vpc = new ec2.Vpc(stack, 'Stack'); - group1 = new elbv2.NetworkTargetGroup(stack, 'TargetGroup1', { vpc, port: 80 }); - group2 = new elbv2.NetworkTargetGroup(stack, 'TargetGroup2', { vpc, port: 80 }); - lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); +beforeEach(() => { + stack = new cdk.Stack(); + const vpc = new ec2.Vpc(stack, 'Stack'); + group1 = new elbv2.NetworkTargetGroup(stack, 'TargetGroup1', { vpc, port: 80 }); + group2 = new elbv2.NetworkTargetGroup(stack, 'TargetGroup2', { vpc, port: 80 }); + lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); +}); - cb(); - }, - - 'Forward to multiple targetgroups with an Action and stickiness'(test: Test) { +describe('tests', () => { + test('Forward to multiple targetgroups with an Action and stickiness', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -30,7 +27,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { ForwardConfig: { @@ -50,12 +47,10 @@ export = { Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Weighted forward to multiple targetgroups with an Action'(test: Test) { + test('Weighted forward to multiple targetgroups with an Action', () => { // WHEN lb.addListener('Listener', { port: 80, @@ -68,7 +63,7 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { ForwardConfig: { @@ -90,7 +85,6 @@ export = { Type: 'forward', }, ], - })); - test.done(); - }, -}; \ No newline at end of file + }); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.listener.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts similarity index 76% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.listener.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts index 9c16210a9ed68..6ffbdc0ebd6c3 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.listener.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/listener.test.ts @@ -1,13 +1,13 @@ -import { expect, haveResource, MatchStyle } from '@aws-cdk/assert'; +import { MatchStyle } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as acm from '@aws-cdk/aws-certificatemanager'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; import { FakeSelfRegisteringTarget } from '../helpers'; -export = { - 'Trivial add listener'(test: Test) { +describe('tests', () => { + test('Trivial add listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -20,15 +20,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'TCP', Port: 443, - })); - - test.done(); - }, + }); + }); - 'Can add target groups'(test: Test) { + test('Can add target groups', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -40,19 +38,17 @@ export = { listener.addTargetGroups('Default', group); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'TargetGroup3D7CD9B8' }, Type: 'forward', }, ], - })); - - test.done(); - }, + }); + }); - 'Can implicitly create target groups'(test: Test) { + test('Can implicitly create target groups', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -66,27 +62,25 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'LBListenerTargetsGroup76EF81E8' }, Type: 'forward', }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { VpcId: { Ref: 'Stack8A423254' }, Port: 80, Protocol: 'TCP', Targets: [ { Id: 'i-12345' }, ], - })); - - test.done(); - }, + }); + }); - 'implicitly created target group inherits protocol'(test: Test) { + test('implicitly created target group inherits protocol', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -100,27 +94,25 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { DefaultActions: [ { TargetGroupArn: { Ref: 'LBListenerTargetsGroup76EF81E8' }, Type: 'forward', }, ], - })); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + }); + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { VpcId: { Ref: 'Stack8A423254' }, Port: 9700, Protocol: 'TCP_UDP', Targets: [ { Id: 'i-12345' }, ], - })); - - test.done(); - }, + }); + }); - 'Enable health check for targets'(test: Test) { + test('Enable health check for targets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -137,14 +129,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { HealthCheckIntervalSeconds: 30, - })); - - test.done(); - }, + }); + }); - 'Enable taking a dependency on an NLB target group\'s load balancer'(test: Test) { + test('Enable taking a dependency on an NLB target group\'s load balancer', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -159,7 +149,7 @@ export = { new ResourceWithLBDependency(stack, 'MyResource', group); // THEN - expect(stack).toMatch({ + expect(stack).toMatchTemplate({ Resources: { MyResource: { Type: 'Test::Resource', @@ -172,11 +162,9 @@ export = { }, }, }, MatchStyle.SUPERSET); + }); - test.done(); - }, - - 'Trivial add TLS listener'(test: Test) { + test('Trivial add TLS listener', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -195,33 +183,29 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::Listener', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::Listener', { Protocol: 'TLS', Port: 443, Certificates: [ { CertificateArn: { Ref: 'Certificate4E7ABB08' } }, ], SslPolicy: 'ELBSecurityPolicy-TLS-1-2-2017-01', - })); - - test.done(); - }, + }); + }); - 'Invalid Protocol listener'(test: Test) { + test('Invalid Protocol listener', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); - test.throws(() => lb.addListener('Listener', { + expect(() => lb.addListener('Listener', { port: 443, protocol: elbv2.Protocol.HTTP, defaultTargetGroups: [new elbv2.NetworkTargetGroup(stack, 'Group', { vpc, port: 80 })], - }), /The protocol must be one of TCP, TLS, UDP, TCP_UDP\. Found HTTP/); + })).toThrow(/The protocol must be one of TCP, TLS, UDP, TCP_UDP\. Found HTTP/); + }); - test.done(); - }, - - 'Invalid Listener Target Healthcheck Interval'(test: Test) { + test('Invalid Listener Target Healthcheck Interval', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); @@ -235,12 +219,10 @@ export = { const validationErrors: string[] = (targetGroup as any).validate(); const intervalError = validationErrors.find((err) => /Health check interval '60' not supported. Must be one of the following values/.test(err)); - test.notEqual(intervalError, undefined, 'Failed to return health check interval validation error'); - - test.done(); - }, + expect(intervalError).toBeDefined(); + }); - 'validation error if invalid health check protocol'(test: Test) { + test('validation error if invalid health check protocol', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); @@ -259,12 +241,10 @@ export = { // THEN const validationErrors: string[] = (targetGroup as any).validate(); - test.deepEqual(validationErrors, ["Health check protocol 'UDP' is not supported. Must be one of [HTTP, HTTPS, TCP]"]); - - test.done(); - }, + expect(validationErrors).toEqual(["Health check protocol 'UDP' is not supported. Must be one of [HTTP, HTTPS, TCP]"]); + }); - 'validation error if invalid path health check protocol'(test: Test) { + test('validation error if invalid path health check protocol', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); @@ -284,14 +264,12 @@ export = { // THEN const validationErrors: string[] = (targetGroup as any).validate(); - test.deepEqual(validationErrors, [ + expect(validationErrors).toEqual([ "'TCP' health checks do not support the path property. Must be one of [HTTP, HTTPS]", ]); + }); - test.done(); - }, - - 'validation error if invalid timeout health check'(test: Test) { + test('validation error if invalid timeout health check', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); @@ -311,28 +289,24 @@ export = { // THEN const validationErrors: string[] = (targetGroup as any).validate(); - test.deepEqual(validationErrors, [ + expect(validationErrors).toEqual([ 'Custom health check timeouts are not supported for Network Load Balancer health checks. Expected 6 seconds for HTTP, got 10', ]); + }); - test.done(); - }, - - 'Protocol & certs TLS listener'(test: Test) { + test('Protocol & certs TLS listener', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); - test.throws(() => lb.addListener('Listener', { + expect(() => lb.addListener('Listener', { port: 443, protocol: elbv2.Protocol.TLS, defaultTargetGroups: [new elbv2.NetworkTargetGroup(stack, 'Group', { vpc, port: 80 })], - }), /When the protocol is set to TLS, you must specify certificates/); - - test.done(); - }, + })).toThrow(/When the protocol is set to TLS, you must specify certificates/); + }); - 'TLS and certs specified listener'(test: Test) { + test('TLS and certs specified listener', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); @@ -340,17 +314,15 @@ export = { domainName: 'example.com', }); - test.throws(() => lb.addListener('Listener', { + expect(() => lb.addListener('Listener', { port: 443, protocol: elbv2.Protocol.TCP, certificates: [{ certificateArn: cert.certificateArn }], defaultTargetGroups: [new elbv2.NetworkTargetGroup(stack, 'Group', { vpc, port: 80 })], - }), /Protocol must be TLS when certificates have been specified/); + })).toThrow(/Protocol must be TLS when certificates have been specified/); + }); - test.done(); - }, - - 'not allowed to specify defaultTargetGroups and defaultAction together'(test: Test) { + test('not allowed to specify defaultTargetGroups and defaultAction together', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -358,17 +330,15 @@ export = { const lb = new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); // WHEN - test.throws(() => { + expect(() => { lb.addListener('Listener1', { port: 80, defaultTargetGroups: [group], defaultAction: elbv2.NetworkListenerAction.forward([group]), }); - }, /Specify at most one/); - - test.done(); - }, -}; + }).toThrow(/Specify at most one/); + }); +}); class ResourceWithLBDependency extends cdk.CfnResource { constructor(scope: cdk.Construct, id: string, targetGroup: elbv2.ITargetGroup) { diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.load-balancer.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts similarity index 78% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.load-balancer.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts index f80755c536586..667b72875ef78 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.load-balancer.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/load-balancer.test.ts @@ -1,12 +1,12 @@ -import { expect, haveResource, ResourcePart } from '@aws-cdk/assert'; +import { ResourcePart } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as s3 from '@aws-cdk/aws-s3'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; -export = { - 'Trivial construction: internet facing'(test: Test) { +describe('tests', () => { + test('Trivial construction: internet facing', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -18,19 +18,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internet-facing', Subnets: [ { Ref: 'StackPublicSubnet1Subnet0AD81D22' }, { Ref: 'StackPublicSubnet2Subnet3C7D2288' }, ], Type: 'network', - })); - - test.done(); - }, + }); + }); - 'Trivial construction: internal'(test: Test) { + test('Trivial construction: internal', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -39,19 +37,17 @@ export = { new elbv2.NetworkLoadBalancer(stack, 'LB', { vpc }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'StackPrivateSubnet1Subnet47AC2BC7' }, { Ref: 'StackPrivateSubnet2SubnetA2F8EDD8' }, ], Type: 'network', - })); - - test.done(); - }, + }); + }); - 'Attributes'(test: Test) { + test('Attributes', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -63,19 +59,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'load_balancing.cross_zone.enabled', Value: 'true', }, ], - })); - - test.done(); - }, + }); + }); - 'Access logging'(test: Test) { + test('Access logging', () => { // GIVEN const stack = new cdk.Stack(undefined, undefined, { env: { region: 'us-east-1' } }); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -88,7 +82,7 @@ export = { // THEN // verify that the LB attributes reference the bucket - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'access_logs.s3.enabled', @@ -99,10 +93,10 @@ export = { Value: { Ref: 'AccessLoggingBucketA6D88F29' }, }, ], - })); + }); // verify the bucket policy allows the ALB to put objects in the bucket - expect(stack).to(haveResource('AWS::S3::BucketPolicy', { + expect(stack).toHaveResource('AWS::S3::BucketPolicy', { PolicyDocument: { Version: '2012-10-17', Statement: [ @@ -135,17 +129,15 @@ export = { }, ], }, - })); + }); // verify the ALB depends on the bucket *and* the bucket policy - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { DependsOn: ['AccessLoggingBucketPolicy700D7CC6', 'AccessLoggingBucketA6D88F29'], - }, ResourcePart.CompleteDefinition)); - - test.done(); - }, + }, ResourcePart.CompleteDefinition); + }); - 'access logging with prefix'(test: Test) { + test('access logging with prefix', () => { // GIVEN const stack = new cdk.Stack(undefined, undefined, { env: { region: 'us-east-1' } }); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -157,7 +149,7 @@ export = { // THEN // verify that the LB attributes reference the bucket - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { LoadBalancerAttributes: [ { Key: 'access_logs.s3.enabled', @@ -172,10 +164,10 @@ export = { Value: 'prefix-of-access-logs', }, ], - })); + }); // verify the bucket policy allows the ALB to put objects in the bucket - expect(stack).to(haveResource('AWS::S3::BucketPolicy', { + expect(stack).toHaveResource('AWS::S3::BucketPolicy', { PolicyDocument: { Version: '2012-10-17', Statement: [ @@ -208,12 +200,10 @@ export = { }, ], }, - })); - - test.done(); - }, + }); + }); - 'loadBalancerName'(test: Test) { + test('loadBalancerName', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Stack'); @@ -225,13 +215,12 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Name: 'myLoadBalancer', - })); - test.done(); - }, + }); + }); - 'imported network load balancer with no vpc specified throws error when calling addTargets'(test: Test) { + test('imported network load balancer with no vpc specified throws error when calling addTargets', () => { // GIVEN const stack = new cdk.Stack(); const nlbArn = 'arn:aws:elasticloadbalancing::000000000000::dummyloadbalancer'; @@ -240,12 +229,10 @@ export = { }); // WHEN const listener = nlb.addListener('Listener', { port: 80 }); - test.throws(() => listener.addTargets('targetgroup', { port: 8080 })); + expect(() => listener.addTargets('targetgroup', { port: 8080 })).toThrow(); + }); - test.done(); - }, - - 'imported network load balancer with vpc does not throw error when calling addTargets'(test: Test) { + test('imported network load balancer with vpc does not throw error when calling addTargets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -256,12 +243,10 @@ export = { }); // WHEN const listener = nlb.addListener('Listener', { port: 80 }); - test.doesNotThrow(() => listener.addTargets('targetgroup', { port: 8080 })); - - test.done(); - }, + expect(() => listener.addTargets('targetgroup', { port: 8080 })).not.toThrow(); + }); - 'Trivial construction: internal with Isolated subnets only'(test: Test) { + test('Trivial construction: internal with Isolated subnets only', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC', { @@ -279,18 +264,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'VPCIsolatedSubnet1SubnetEBD00FC6' }, { Ref: 'VPCIsolatedSubnet2Subnet4B1C8CAA' }, ], Type: 'network', - })); - - test.done(); - }, - 'Internal with Public, Private, and Isolated subnets'(test: Test) { + }); + }); + test('Internal with Public, Private, and Isolated subnets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC', { @@ -316,18 +299,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'VPCPrivateSubnet1Subnet8BCA10E0' }, { Ref: 'VPCPrivateSubnet2SubnetCFCDAA7A' }, ], Type: 'network', - })); - - test.done(); - }, - 'Internet-facing with Public, Private, and Isolated subnets'(test: Test) { + }); + }); + test('Internet-facing with Public, Private, and Isolated subnets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC', { @@ -353,18 +334,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internet-facing', Subnets: [ { Ref: 'VPCPublicSubnet1SubnetB4246D30' }, { Ref: 'VPCPublicSubnet2Subnet74179F39' }, ], Type: 'network', - })); - - test.done(); - }, - 'Internal load balancer supplying public subnets'(test: Test) { + }); + }); + test('Internal load balancer supplying public subnets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC'); @@ -377,18 +356,16 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'VPCPublicSubnet1SubnetB4246D30' }, { Ref: 'VPCPublicSubnet2Subnet74179F39' }, ], Type: 'network', - })); - - test.done(); - }, - 'Internal load balancer supplying isolated subnets'(test: Test) { + }); + }); + test('Internal load balancer supplying isolated subnets', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'VPC', { @@ -415,15 +392,13 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::LoadBalancer', { Scheme: 'internal', Subnets: [ { Ref: 'VPCIsolatedSubnet1SubnetEBD00FC6' }, { Ref: 'VPCIsolatedSubnet2Subnet4B1C8CAA' }, ], Type: 'network', - })); - - test.done(); - }, -}; + }); + }); +}); diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.target-group.ts b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts similarity index 62% rename from packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.target-group.ts rename to packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts index 08f7d8396b662..692d76e5f42ac 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/test.target-group.ts +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/test/nlb/target-group.test.ts @@ -1,11 +1,10 @@ -import { expect, haveResource } from '@aws-cdk/assert'; +import '@aws-cdk/assert/jest'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; -import { Test } from 'nodeunit'; import * as elbv2 from '../../lib'; -export = { - 'Enable proxy protocol v2 attribute for target group'(test: Test) { +describe('tests', () => { + test('Enable proxy protocol v2 attribute for target group', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -18,19 +17,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { TargetGroupAttributes: [ { Key: 'proxy_protocol_v2.enabled', Value: 'true', }, ], - })); - - test.done(); - }, + }); + }); - 'Disable proxy protocol v2 for attribute target group'(test: Test) { + test('Disable proxy protocol v2 for attribute target group', () => { // GIVEN const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -43,19 +40,17 @@ export = { }); // THEN - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { TargetGroupAttributes: [ { Key: 'proxy_protocol_v2.enabled', Value: 'false', }, ], - })); - - test.done(); - }, + }); + }); - 'Configure protocols for target group'(test: Test) { + test('Configure protocols for target group', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -65,14 +60,12 @@ export = { protocol: elbv2.Protocol.UDP, }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { Protocol: 'UDP', - })); - - test.done(); - }, + }); + }); - 'Target group defaults to TCP'(test: Test) { + test('Target group defaults to TCP', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); @@ -81,25 +74,21 @@ export = { port: 80, }); - expect(stack).to(haveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { + expect(stack).toHaveResource('AWS::ElasticLoadBalancingV2::TargetGroup', { Protocol: 'TCP', - })); - - test.done(); - }, + }); + }); - 'Throws error for unacceptable protocol'(test: Test) { + test('Throws error for unacceptable protocol', () => { const stack = new cdk.Stack(); const vpc = new ec2.Vpc(stack, 'Vpc'); - test.throws(() => { + expect(() => { new elbv2.NetworkTargetGroup(stack, 'Group', { vpc, port: 80, protocol: elbv2.Protocol.HTTPS, }); - }); - - test.done(); - }, -}; \ No newline at end of file + }).toThrow(); + }); +}); From a9136489d11d37ee1af25b3538eeb0420377ecf0 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Wed, 26 Aug 2020 19:07:12 +0300 Subject: [PATCH 34/42] chore(mergify): fix status check name (#9987) Following up on https://github.com/aws/aws-cdk/pull/9928 which changed the name of the job from `mandatory-changes` to `validate-pr`. --- .mergify.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.mergify.yml b/.mergify.yml index 25c67f41b33ea..96cc7bbb7c21f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -31,7 +31,7 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 #- status-success=Semantic Pull Request - - status-success=mandatory-changes + - status-success=validate-pr - name: automatic merge (2+ approvers) actions: comment: @@ -56,7 +56,7 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 #- status-success=Semantic Pull Request - - status-success=mandatory-changes + - status-success=validate-pr - name: automatic merge (no-squash) actions: comment: @@ -82,7 +82,7 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 #- status-success=Semantic Pull Request - - status-success=mandatory-changes + - status-success=validate-pr - name: remove stale reviews actions: dismiss_reviews: @@ -126,4 +126,4 @@ pull_request_rules: - "#changes-requested-reviews-by=0" - status-success~=AWS CodeBuild us-east-1 #- status-success=Semantic Pull Request - - status-success=mandatory-changes + - status-success=validate-pr From 71c60f20300790bd8f4fa898c8855d93d37d7cd9 Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Wed, 26 Aug 2020 21:23:23 +0100 Subject: [PATCH 35/42] fix(lambda): cannot use latest version in multiple cloudfront distributions (#9966) The error produced is around construct collision, i.e., "There is already a Construct with name '$LATEST'". The fix is to cache the latest version on the instance. fixes #4459 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-lambda/lib/function-base.ts | 8 ++++-- .../@aws-cdk/aws-lambda/test/test.function.ts | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index 02b0e5d3285b1..8cbc0f241863a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -194,6 +194,8 @@ export abstract class FunctionBase extends Resource implements IFunction { */ protected _connections?: ec2.Connections; + private _latestVersion?: LatestVersion; + /** * Adds a permission to the Lambda resource policy. * @param id The id ƒor the permission construct @@ -244,8 +246,10 @@ export abstract class FunctionBase extends Resource implements IFunction { } public get latestVersion(): IVersion { - // Dynamic to avoid infinite recursion when creating the LatestVersion instance... - return new LatestVersion(this); + if (!this._latestVersion) { + this._latestVersion = new LatestVersion(this); + } + return this._latestVersion; } /** diff --git a/packages/@aws-cdk/aws-lambda/test/test.function.ts b/packages/@aws-cdk/aws-lambda/test/test.function.ts index 352d438e9c547..94c878161221b 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.function.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.function.ts @@ -359,6 +359,31 @@ export = testCase({ test.done(); }, + 'multiple calls to latestVersion returns the same version'(test: Test) { + const stack = new cdk.Stack(); + + const fn = new lambda.Function(stack, 'MyLambda', { + code: new lambda.InlineCode('hello()'), + handler: 'index.hello', + runtime: lambda.Runtime.NODEJS_10_X, + }); + + const version1 = fn.latestVersion; + const version2 = fn.latestVersion; + + const expectedArn = { + 'Fn::Join': ['', [ + { 'Fn::GetAtt': ['MyLambdaCCE802FB', 'Arn'] }, + ':$LATEST', + ]], + }; + test.equal(version1, version2); + test.deepEqual(stack.resolve(version1.functionArn), expectedArn); + test.deepEqual(stack.resolve(version2.functionArn), expectedArn); + + test.done(); + }, + 'currentVersion': { // see test.function-hash.ts for more coverage for this 'logical id of version is based on the function hash'(test: Test) { From e6db2a0ff686b6f045f440b1545711c7bdc1712c Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Wed, 26 Aug 2020 22:46:59 +0200 Subject: [PATCH 36/42] chore(lambda): current version for singleton functions (#9892) Add `currentVersion` for singleton functions. This makes it possible to use them for Lambda@Edge. To achieve this, make `ensureLambda()` return a `Function` and not an `IFunction` (which now allows to remove the default implementation of `_checkEdgeCompatibilty()` in `FunctionBase`). Also remove deprecated calls to `addVersion()` introduced in #9562. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-cloudfront/test/distribution.test.ts | 36 +++++++++++++++++++ .../test/web_distribution.test.ts | 8 ++--- .../@aws-cdk/aws-lambda/lib/function-base.ts | 9 ----- .../@aws-cdk/aws-lambda/lib/lambda-version.ts | 4 +-- .../aws-lambda/lib/singleton-lambda.ts | 25 +++++++++---- .../aws-lambda/test/test.lambda-version.ts | 6 ++-- .../aws-lambda/test/test.singleton-lambda.ts | 24 +++++++++++++ 7 files changed, 87 insertions(+), 25 deletions(-) diff --git a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts index 0d79aa18bf10b..0a8b5933e7f59 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/distribution.test.ts @@ -592,6 +592,42 @@ describe('with Lambda@Edge functions', () => { expect(() => app.synth()).toThrow(/KEY/); }); + + test('with singleton function', () => { + const singleton = new lambda.SingletonFunction(stack, 'Singleton', { + uuid: 'singleton-for-cloudfront', + runtime: lambda.Runtime.NODEJS_12_X, + code: lambda.Code.fromInline('code'), + handler: 'index.handler', + }); + + new Distribution(stack, 'MyDist', { + defaultBehavior: { + origin, + edgeLambdas: [ + { + functionVersion: singleton.currentVersion, + eventType: LambdaEdgeEventType.ORIGIN_REQUEST, + }, + ], + }, + }); + + expect(stack).toHaveResourceLike('AWS::CloudFront::Distribution', { + DistributionConfig: { + DefaultCacheBehavior: { + LambdaFunctionAssociations: [ + { + EventType: 'origin-request', + LambdaFunctionARN: { + Ref: 'SingletonLambdasingletonforcloudfrontCurrentVersion0078406348a0962a52448a200cd0dbc0e22edb2a', + }, + }, + ], + }, + }, + }); + }); }); test('price class is included if provided', () => { diff --git a/packages/@aws-cdk/aws-cloudfront/test/web_distribution.test.ts b/packages/@aws-cdk/aws-cloudfront/test/web_distribution.test.ts index e91c4e2f53192..c6cd639a7262a 100644 --- a/packages/@aws-cdk/aws-cloudfront/test/web_distribution.test.ts +++ b/packages/@aws-cdk/aws-cloudfront/test/web_distribution.test.ts @@ -443,7 +443,7 @@ nodeunitShim({ isDefaultBehavior: true, lambdaFunctionAssociations: [{ eventType: LambdaEdgeEventType.ORIGIN_REQUEST, - lambdaFunction: lambdaFunction.addVersion('1'), + lambdaFunction: lambdaFunction.currentVersion, }], }, ], @@ -458,7 +458,7 @@ nodeunitShim({ { 'EventType': 'origin-request', 'LambdaFunctionARN': { - 'Ref': 'LambdaVersion1BB7548E1', + 'Ref': 'LambdaCurrentVersionDF706F6A97fb843e9bd06fcd2bb15eeace80e13e', }, }, ], @@ -492,7 +492,7 @@ nodeunitShim({ isDefaultBehavior: true, lambdaFunctionAssociations: [{ eventType: LambdaEdgeEventType.ORIGIN_REQUEST, - lambdaFunction: lambdaFunction.addVersion('1'), + lambdaFunction: lambdaFunction.currentVersion, }], }, ], @@ -532,7 +532,7 @@ nodeunitShim({ isDefaultBehavior: true, lambdaFunctionAssociations: [{ eventType: LambdaEdgeEventType.ORIGIN_REQUEST, - lambdaFunction: lambdaFunction.addVersion('1'), + lambdaFunction: lambdaFunction.currentVersion, }], }, ], diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index 8cbc0f241863a..be0b5fffd4d39 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -324,15 +324,6 @@ export abstract class FunctionBase extends Resource implements IFunction { }); } - /** - * Checks whether this function is compatible for Lambda@Edge. - * - * @internal - */ - public _checkEdgeCompatibility(): void { - return; - } - /** * Returns the construct tree node that corresponds to the lambda function. * For use internally for constructs, when the tree is set up in non-standard ways. Ex: SingletonFunction. diff --git a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts index 17791a8d2ff7e..34ef68dc93e1a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts +++ b/packages/@aws-cdk/aws-lambda/lib/lambda-version.ts @@ -3,7 +3,7 @@ import { Construct, Fn, Lazy, RemovalPolicy } from '@aws-cdk/core'; import { Alias, AliasOptions } from './alias'; import { EventInvokeConfigOptions } from './event-invoke-config'; import { Function } from './function'; -import { FunctionBase, IFunction, QualifiedFunctionBase } from './function-base'; +import { IFunction, QualifiedFunctionBase } from './function-base'; import { CfnVersion } from './lambda.generated'; import { addAlias } from './util'; @@ -253,7 +253,7 @@ export class Version extends QualifiedFunctionBase implements IVersion { return Lazy.stringValue({ produce: () => { // Validate that the underlying function can be used for Lambda@Edge - if (this.lambda instanceof FunctionBase) { + if (this.lambda instanceof Function) { this.lambda._checkEdgeCompatibility(); } diff --git a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts index 5cb9a84f88613..9a8e54472232a 100644 --- a/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/lib/singleton-lambda.ts @@ -1,7 +1,8 @@ import * as iam from '@aws-cdk/aws-iam'; import * as cdk from '@aws-cdk/core'; import { Function as LambdaFunction, FunctionProps } from './function'; -import { FunctionBase, IFunction } from './function-base'; +import { FunctionBase } from './function-base'; +import { Version } from './lambda-version'; import { Permission } from './permission'; /** @@ -45,7 +46,7 @@ export class SingletonFunction extends FunctionBase { public readonly role?: iam.IRole; public readonly permissionsNode: cdk.ConstructNode; protected readonly canCreatePermissions: boolean; - private lambdaFunction: IFunction; + private lambdaFunction: LambdaFunction; constructor(scope: cdk.Construct, id: string, props: SingletonFunctionProps) { super(scope, id); @@ -61,6 +62,18 @@ export class SingletonFunction extends FunctionBase { this.canCreatePermissions = true; // Doesn't matter, addPermission is overriden anyway } + /** + * Returns a `lambda.Version` which represents the current version of this + * singleton Lambda function. A new version will be created every time the + * function's configuration changes. + * + * You can specify options for this version using the `currentVersionOptions` + * prop when initializing the `lambda.SingletonFunction`. + */ + public get currentVersion(): Version { + return this.lambdaFunction.currentVersion; + } + public addPermission(name: string, permission: Permission) { return this.lambdaFunction.addPermission(name, permission); } @@ -83,9 +96,7 @@ export class SingletonFunction extends FunctionBase { /** @internal */ public _checkEdgeCompatibility() { - if (this.lambdaFunction instanceof FunctionBase) { - return this.lambdaFunction._checkEdgeCompatibility(); - } + return this.lambdaFunction._checkEdgeCompatibility(); } /** @@ -96,12 +107,12 @@ export class SingletonFunction extends FunctionBase { return this.lambdaFunction.node; } - private ensureLambda(props: SingletonFunctionProps): IFunction { + private ensureLambda(props: SingletonFunctionProps): LambdaFunction { const constructName = (props.lambdaPurpose || 'SingletonLambda') + slugify(props.uuid); const existing = cdk.Stack.of(this).node.tryFindChild(constructName); if (existing) { // Just assume this is true - return existing as FunctionBase; + return existing as LambdaFunction; } return new LambdaFunction(cdk.Stack.of(this), constructName, props); diff --git a/packages/@aws-cdk/aws-lambda/test/test.lambda-version.ts b/packages/@aws-cdk/aws-lambda/test/test.lambda-version.ts index 8c9c4a45fd8e3..e06ce385522ea 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.lambda-version.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.lambda-version.ts @@ -151,10 +151,10 @@ export = { handler: 'index.handler', code: lambda.Code.fromInline('foo'), }); - const version = fn.addVersion('1'); + const version = fn.currentVersion; // THEN - test.deepEqual(stack.resolve(version.edgeArn), { Ref: 'FnVersion1C3F5F93D' }); + test.deepEqual(stack.resolve(version.edgeArn), { Ref: 'FnCurrentVersion17A89ABB19ed45993ff69fd011ae9fd4ab6e2005' }); test.done(); }, @@ -179,7 +179,7 @@ export = { handler: 'index.handler', code: lambda.Code.fromInline('foo'), }); - const version = fn.addVersion('1'); + const version = fn.currentVersion; // WHEN new lambda.Function(stack, 'OtherFn', { diff --git a/packages/@aws-cdk/aws-lambda/test/test.singleton-lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.singleton-lambda.ts index 6df79c0a278eb..0183e78badd27 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.singleton-lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.singleton-lambda.ts @@ -160,4 +160,28 @@ export = { test.done(); }, + + 'current version of a singleton function'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const singleton = new lambda.SingletonFunction(stack, 'Singleton', { + uuid: '84c0de93-353f-4217-9b0b-45b6c993251a', + code: new lambda.InlineCode('foo'), + runtime: lambda.Runtime.NODEJS_12_X, + handler: 'index.handler', + }); + + // WHEN + const version = singleton.currentVersion; + version.addAlias('foo'); + + // THEN + expect(stack).to(haveResource('AWS::Lambda::Version', { + FunctionName: { + Ref: 'SingletonLambda84c0de93353f42179b0b45b6c993251a840BCC38', + }, + })); + + test.done(); + }, }; From a4185a0a2a5f95dfdfed656f5f16d49c95f7cf83 Mon Sep 17 00:00:00 2001 From: Jonathan Goldwasser Date: Wed, 26 Aug 2020 23:12:26 +0200 Subject: [PATCH 37/42] fix(lambda-nodejs): incorrect working directory for local bundling (#9870) Execute local bundling from the directory containing the entry file. Without this change, in a monorepo with multiple `package.json` files or when consuming a module exposing a construct, Parcel doesn't look for the right `package.json`. Also fix a regression introduced in #9632 for the working directory in the container. ---- *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/lib/bundlers.ts | 3 ++- packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts index d161283685a21..60ea23305f527 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/lib/bundlers.ts @@ -64,6 +64,7 @@ export class LocalBundler implements cdk.ILocalBundling { process.stderr, // redirect stdout to stderr 'inherit', // inherit stderr ], + cwd: path.dirname(path.join(this.props.projectRoot, this.props.relativeEntryPath)), }); return true; } @@ -107,7 +108,7 @@ export class DockerBundler { image, command: ['bash', '-c', command], environment: props.environment, - workingDirectory: path.dirname(path.join(cdk.AssetStaging.BUNDLING_INPUT_DIR, props.relativeEntryPath)), + workingDirectory: path.dirname(path.join(cdk.AssetStaging.BUNDLING_INPUT_DIR, props.relativeEntryPath)).replace(/\\/g, '/'), // Always use POSIX paths in the container, }; } } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts index e0cdc0ba44ba1..0d7755fbed9e9 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/bundling.test.ts @@ -241,6 +241,7 @@ test('Local bundling', () => { ], expect.objectContaining({ env: expect.objectContaining({ KEY: 'value' }), + cwd: '/project/folder', }), ); From f5c91243b68886ca5daf4ad0bc6773c1cbb74eb0 Mon Sep 17 00:00:00 2001 From: Josh Kellendonk Date: Wed, 26 Aug 2020 15:37:41 -0600 Subject: [PATCH 38/42] chore(core): allow the bundler to re-use pre-existing bundler output (revisited) (#9576) This PR changes `AssetStaging` so that the bundler will re-use pre-existing output. Before, the bundler would re-run Docker without considering pre-existing assets, which was slow. Now, when handling a `SOURCE` hash type, the bundler detects and returns pre-existing asset output without re-running Docker. For all other hash types, the bundler outputs to an intermediate directory before calculating asset hashes, then renames the intermediate directory into its final location. This PR revisits #8916 which originally closed #8882. Here are some details from the previous PR which have been addressed in this PR: - The bundler now outputs directly into the assembly directory - The bundler's assets can be reused between multiple syntheses - The bundler keeps output from failed bundling attempts for diagnosability purposes (renamed with an `-error` suffix) - Bundler options are hashed together with custom and source hashes - Removed the check for a docker run from `throws with assetHash and not CUSTOM hash type` as docker is no longer run before the AssetStaging props are validated. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../test/integ.function.expected.json | 18 +- .../test/integ.function.py38.expected.json | 18 +- .../test/lambda-handler/index.py | 4 +- .../test/integ.bundling.expected.json | 18 +- .../integ.assets.bundling.lit.expected.json | 16 +- packages/@aws-cdk/core/lib/asset-staging.ts | 172 ++++++++--- packages/@aws-cdk/core/lib/bundling.ts | 20 +- packages/@aws-cdk/core/test/docker-stub.sh | 1 + packages/@aws-cdk/core/test/test.bundling.ts | 35 ++- packages/@aws-cdk/core/test/test.staging.ts | 277 ++++++++++++++++-- 10 files changed, 473 insertions(+), 106 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json index 7466ec4d88601..8e0748d1ec6db 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3Bucket0552B5BB" + "Ref": "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4S3Bucket3D64A262" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10" + "Ref": "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4S3VersionKey676CE5F0" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10" + "Ref": "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4S3VersionKey676CE5F0" } ] } @@ -87,17 +87,17 @@ } }, "Parameters": { - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3Bucket0552B5BB": { + "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4S3Bucket3D64A262": { "Type": "String", - "Description": "S3 bucket for asset \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "S3 bucket for asset \"f7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4\"" }, - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10": { + "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4S3VersionKey676CE5F0": { "Type": "String", - "Description": "S3 key for asset version \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "S3 key for asset version \"f7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4\"" }, - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeArtifactHash3CE06D09": { + "AssetParametersf7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4ArtifactHashAFB301FE": { "Type": "String", - "Description": "Artifact hash for asset \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "Artifact hash for asset \"f7ff2d5c8b3e609d156f7eccbc393419969e89acef6fcc4be4a7091684c1e4d4\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json b/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json index 56d8661ab73d8..b422560243832 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json +++ b/packages/@aws-cdk/aws-lambda-python/test/integ.function.py38.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3Bucket0552B5BB" + "Ref": "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576S3Bucket66CABF48" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10" + "Ref": "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576S3VersionKey46E55A2B" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10" + "Ref": "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576S3VersionKey46E55A2B" } ] } @@ -87,17 +87,17 @@ } }, "Parameters": { - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3Bucket0552B5BB": { + "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576S3Bucket66CABF48": { "Type": "String", - "Description": "S3 bucket for asset \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "S3 bucket for asset \"951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576\"" }, - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeS3VersionKey9522AC10": { + "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576S3VersionKey46E55A2B": { "Type": "String", - "Description": "S3 key for asset version \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "S3 key for asset version \"951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576\"" }, - "AssetParameters822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1adeArtifactHash3CE06D09": { + "AssetParameters951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576ArtifactHash0B035A28": { "Type": "String", - "Description": "Artifact hash for asset \"822ec544787c04e6b27b02f2408e4c322d48fbd352adb46d5aa2d6b3553a1ade\"" + "Description": "Artifact hash for asset \"951d4d5feb891818f169fae0666f355ee76ca00ff218f5b171de713d8b8da576\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/index.py b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/index.py index 25d1fc8520d7f..c033f37560534 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/index.py +++ b/packages/@aws-cdk/aws-lambda-python/test/lambda-handler/index.py @@ -2,8 +2,8 @@ from PIL import Image def handler(event, context): - response = requests.get('https://a0.awsstatic.com/main/images/logos/aws_smile-header-desktop-en-white_59x35.png', stream=True).raw - img = Image.open(response) + response = requests.get('https://a0.awsstatic.com/main/images/logos/aws_smile-header-desktop-en-white_59x35.png', stream=True) + img = Image.open(response.raw) print(response.status_code) print(img.size) diff --git a/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json index aa5a63c7a3c3d..f91b4ba673c9e 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.bundling.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdS3Bucket6365D8AA" + "Ref": "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1S3BucketF4EA3D4A" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdS3VersionKey14A1DBA7" + "Ref": "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1S3VersionKey50AB224E" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdS3VersionKey14A1DBA7" + "Ref": "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1S3VersionKey50AB224E" } ] } @@ -87,17 +87,17 @@ } }, "Parameters": { - "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdS3Bucket6365D8AA": { + "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1S3BucketF4EA3D4A": { "Type": "String", - "Description": "S3 bucket for asset \"0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cd\"" + "Description": "S3 bucket for asset \"fbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1\"" }, - "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdS3VersionKey14A1DBA7": { + "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1S3VersionKey50AB224E": { "Type": "String", - "Description": "S3 key for asset version \"0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cd\"" + "Description": "S3 key for asset version \"fbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1\"" }, - "AssetParameters0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cdArtifactHashEEC2ED67": { + "AssetParametersfbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1ArtifactHashDD1BB80E": { "Type": "String", - "Description": "Artifact hash for asset \"0ccf37fa0b92d4598d010192eb994040c2e22cc6b12270736d323437817112cd\"" + "Description": "Artifact hash for asset \"fbf992a3e922c30f9aed74db034a1ec115ec16544160e6820e5d2463bf1e29d1\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json index 21d2d76dbd488..3f1cef1b0c4f4 100644 --- a/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json +++ b/packages/@aws-cdk/aws-s3-assets/test/integ.assets.bundling.lit.expected.json @@ -1,16 +1,16 @@ { "Parameters": { - "AssetParameters10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8S3Bucket8CD0F73B": { + "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583": { "Type": "String", - "Description": "S3 bucket for asset \"10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8\"" + "Description": "S3 bucket for asset \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" }, - "AssetParameters10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8S3VersionKeyA9EAF743": { + "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3VersionKey39CCFFC8": { "Type": "String", - "Description": "S3 key for asset version \"10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8\"" + "Description": "S3 key for asset version \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" }, - "AssetParameters10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8ArtifactHashBAE492DD": { + "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2ArtifactHashDF68D9B9": { "Type": "String", - "Description": "Artifact hash for asset \"10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8\"" + "Description": "Artifact hash for asset \"8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2\"" } }, "Resources": { @@ -40,7 +40,7 @@ }, ":s3:::", { - "Ref": "AssetParameters10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8S3Bucket8CD0F73B" + "Ref": "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583" } ] ] @@ -55,7 +55,7 @@ }, ":s3:::", { - "Ref": "AssetParameters10af79ff4bd6432db05b51810586c19ca95abd08759fca785e44f594bc9633b8S3Bucket8CD0F73B" + "Ref": "AssetParameters8995e9405bdcae88dc6fc76b4fc224fecfd00ef93663cb759b491c6a13cc59c2S3Bucket32756583" }, "/*" ] diff --git a/packages/@aws-cdk/core/lib/asset-staging.ts b/packages/@aws-cdk/core/lib/asset-staging.ts index 4c16b960bbb12..6ab46cb987f1d 100644 --- a/packages/@aws-cdk/core/lib/asset-staging.ts +++ b/packages/@aws-cdk/core/lib/asset-staging.ts @@ -9,8 +9,6 @@ import { Construct } from './construct-compat'; import { FileSystem, FingerprintOptions } from './fs'; import { Stage } from './stage'; -const STAGING_TMP = '.cdk.staging'; - /** * Initialization properties for `AssetStaging`. */ @@ -89,27 +87,40 @@ export class AssetStaging extends Construct { this.sourcePath = props.sourcePath; this.fingerprintOptions = props; - if (props.bundling) { - this.bundleDir = this.bundle(props.bundling); + const outdir = Stage.of(this)?.outdir; + if (!outdir) { + throw new Error('unable to determine cloud assembly output directory. Assets must be defined indirectly within a "Stage" or an "App" scope'); } - this.assetHash = this.calculateHash(props); + // Determine the hash type based on the props as props.assetHashType is + // optional from a caller perspective. + const hashType = determineHashType(props.assetHashType, props.assetHash); - const stagingDisabled = this.node.tryGetContext(cxapi.DISABLE_ASSET_STAGING_CONTEXT); - if (stagingDisabled) { - this.stagedPath = this.bundleDir ?? this.sourcePath; - } else { - this.relativePath = `asset.${this.assetHash}${path.extname(this.bundleDir ?? this.sourcePath)}`; + if (props.bundling) { + // Determine the source hash in advance of bundling if the asset hash type + // is SOURCE so that the bundler can opt to re-use its previous output. + const sourceHash = hashType === AssetHashType.SOURCE + ? this.calculateHash(hashType, props.assetHash, props.bundling) + : undefined; + + this.bundleDir = this.bundle(props.bundling, outdir, sourceHash); + this.assetHash = sourceHash ?? this.calculateHash(hashType, props.assetHash, props.bundling); + this.relativePath = renderAssetFilename(this.assetHash); this.stagedPath = this.relativePath; + } else { + this.assetHash = this.calculateHash(hashType, props.assetHash); + + const stagingDisabled = this.node.tryGetContext(cxapi.DISABLE_ASSET_STAGING_CONTEXT); + if (stagingDisabled) { + this.stagedPath = this.sourcePath; + } else { + this.relativePath = renderAssetFilename(this.assetHash, path.extname(this.sourcePath)); + this.stagedPath = this.relativePath; + } } this.sourceHash = this.assetHash; - const outdir = Stage.of(this)?.outdir; - if (!outdir) { - throw new Error('unable to determine cloud assembly output directory. Assets must be defined indirectly within a "Stage" or an "App" scope'); - } - this.stageAsset(outdir); } @@ -121,15 +132,23 @@ export class AssetStaging extends Construct { const targetPath = path.join(outdir, this.relativePath); - // Already staged - if (fs.existsSync(targetPath)) { + // Staging the bundling asset. + if (this.bundleDir) { + const isAlreadyStaged = fs.existsSync(targetPath); + + if (isAlreadyStaged && path.resolve(this.bundleDir) !== path.resolve(targetPath)) { + // When an identical asset is already staged and the bundler used an + // intermediate bundling directory, we remove the extra directory. + fs.removeSync(this.bundleDir); + } else if (!isAlreadyStaged) { + fs.renameSync(this.bundleDir, targetPath); + } + return; } - // Asset has been bundled - if (this.bundleDir) { - // Move bundling directory to staging directory - fs.moveSync(this.bundleDir, targetPath); + // Already staged + if (fs.existsSync(targetPath)) { return; } @@ -145,15 +164,40 @@ export class AssetStaging extends Construct { } } - private bundle(options: BundlingOptions): string { - // Temp staging directory in the working directory - const stagingTmp = path.join('.', STAGING_TMP); - fs.ensureDirSync(stagingTmp); + /** + * Bundles an asset and provides the emitted asset's directory in return. + * + * @param options Bundling options + * @param outdir Parent directory to create the bundle output directory in + * @param sourceHash The asset source hash if known in advance. If this field + * is provided, the bundler may opt to skip bundling, providing any already- + * emitted bundle. If this field is not provided, the bundler uses an + * intermediate directory in outdir. + * @returns The fully resolved bundle output directory. + */ + private bundle(options: BundlingOptions, outdir: string, sourceHash?: string): string { + let bundleDir: string; + if (sourceHash) { + // When an asset hash is known in advance of bundling, the bundler outputs + // directly to the assembly output directory. + bundleDir = path.resolve(path.join(outdir, renderAssetFilename(sourceHash))); + + if (fs.existsSync(bundleDir)) { + // Pre-existing bundle directory. The bundle has already been generated + // once before, so we'll give the caller nothing. + return bundleDir; + } + + fs.ensureDirSync(bundleDir); + } else { + // When the asset hash isn't known in advance, bundler outputs to an + // intermediate directory. - // Create temp directory for bundling inside the temp staging directory - const bundleDir = path.resolve(fs.mkdtempSync(path.join(stagingTmp, 'asset-bundle-'))); - // Chmod the bundleDir to full access. - fs.chmodSync(bundleDir, 0o777); + // Create temp directory for bundling inside the temp staging directory + bundleDir = path.resolve(fs.mkdtempSync(path.join(outdir, 'bundling-temp-'))); + // Chmod the bundleDir to full access. + fs.chmodSync(bundleDir, 0o777); + } let user: string; if (options.user) { @@ -193,7 +237,17 @@ export class AssetStaging extends Construct { }); } } catch (err) { - throw new Error(`Failed to bundle asset ${this.node.path}: ${err}`); + // When bundling fails, keep the bundle output for diagnosability, but + // rename it out of the way so that the next run doesn't assume it has a + // valid bundleDir. + const bundleErrorDir = bundleDir + '-error'; + if (fs.existsSync(bundleErrorDir)) { + // Remove the last bundleErrorDir. + fs.removeSync(bundleErrorDir); + } + + fs.renameSync(bundleDir, bundleErrorDir); + throw new Error(`Failed to bundle asset ${this.node.path}, bundle output is located at ${bundleErrorDir}: ${err}`); } if (FileSystem.isEmpty(bundleDir)) { @@ -204,18 +258,26 @@ export class AssetStaging extends Construct { return bundleDir; } - private calculateHash(props: AssetStagingProps): string { - let hashType: AssetHashType; + private calculateHash(hashType: AssetHashType, assetHash?: string, bundling?: BundlingOptions): string { + if (hashType === AssetHashType.CUSTOM && !assetHash) { + throw new Error('`assetHash` must be specified when `assetHashType` is set to `AssetHashType.CUSTOM`.'); + } + + // When bundling a CUSTOM or SOURCE asset hash type, we want the hash to include + // the bundling configuration. We handle CUSTOM and bundled SOURCE hash types + // as a special case to preserve existing user asset hashes in all other cases. + if (hashType == AssetHashType.CUSTOM || (hashType == AssetHashType.SOURCE && bundling)) { + const hash = crypto.createHash('sha256'); + + // if asset hash is provided by user, use it, otherwise fingerprint the source. + hash.update(assetHash ?? FileSystem.fingerprint(this.sourcePath, this.fingerprintOptions)); - if (props.assetHash) { - if (props.assetHashType && props.assetHashType !== AssetHashType.CUSTOM) { - throw new Error(`Cannot specify \`${props.assetHashType}\` for \`assetHashType\` when \`assetHash\` is specified. Use \`CUSTOM\` or leave \`undefined\`.`); + // If we're bundling an asset, include the bundling configuration in the hash + if (bundling) { + hash.update(JSON.stringify(bundling)); } - hashType = AssetHashType.CUSTOM; - } else if (props.assetHashType) { - hashType = props.assetHashType; - } else { - hashType = AssetHashType.SOURCE; + + return hash.digest('hex'); } switch (hashType) { @@ -226,15 +288,31 @@ export class AssetStaging extends Construct { throw new Error('Cannot use `AssetHashType.BUNDLE` when `bundling` is not specified.'); } return FileSystem.fingerprint(this.bundleDir, this.fingerprintOptions); - case AssetHashType.CUSTOM: - if (!props.assetHash) { - throw new Error('`assetHash` must be specified when `assetHashType` is set to `AssetHashType.CUSTOM`.'); - } - // Hash the hash to make sure we can use it in a file/directory name. - // The resulting hash will also have the same length as for the other hash types. - return crypto.createHash('sha256').update(props.assetHash).digest('hex'); default: throw new Error('Unknown asset hash type.'); } } } + +function renderAssetFilename(assetHash: string, extension = '') { + return `asset.${assetHash}${extension}`; +} + +/** + * Determines the hash type from user-given prop values. + * + * @param assetHashType Asset hash type construct prop + * @param assetHash Asset hash given in the construct props + */ +function determineHashType(assetHashType?: AssetHashType, assetHash?: string) { + if (assetHash) { + if (assetHashType && assetHashType !== AssetHashType.CUSTOM) { + throw new Error(`Cannot specify \`${assetHashType}\` for \`assetHashType\` when \`assetHash\` is specified. Use \`CUSTOM\` or leave \`undefined\`.`); + } + return AssetHashType.CUSTOM; + } else if (assetHashType) { + return assetHashType; + } else { + return AssetHashType.SOURCE; + } +} diff --git a/packages/@aws-cdk/core/lib/bundling.ts b/packages/@aws-cdk/core/lib/bundling.ts index 392b4bd77c519..103d405c1bb2e 100644 --- a/packages/@aws-cdk/core/lib/bundling.ts +++ b/packages/@aws-cdk/core/lib/bundling.ts @@ -1,4 +1,5 @@ import { spawnSync, SpawnSyncOptions } from 'child_process'; +import { FileSystem } from './fs'; /** * Bundling options @@ -121,11 +122,26 @@ export class BundlingDockerImage { throw new Error('Failed to extract image ID from Docker build output'); } - return new BundlingDockerImage(match[1]); + // Fingerprints the directory containing the Dockerfile we're building and + // differentiates the fingerprint based on build arguments. We do this so + // we can provide a stable image hash. Otherwise, the image ID will be + // different every time the Docker layer cache is cleared, due primarily to + // timestamps. + const hash = FileSystem.fingerprint(path, { extraHash: JSON.stringify(options) }); + return new BundlingDockerImage(match[1], hash); } /** @param image The Docker image */ - private constructor(public readonly image: string) {} + private constructor(public readonly image: string, private readonly _imageHash?: string) {} + + /** + * Provides a stable representation of this image for JSON serialization. + * + * @return The overridden image name if set or image hash name in that order + */ + public toJSON() { + return this._imageHash ?? this.image; + } /** * Runs a Docker image diff --git a/packages/@aws-cdk/core/test/docker-stub.sh b/packages/@aws-cdk/core/test/docker-stub.sh index 45a78ef881ebd..fe48e93d4a207 100755 --- a/packages/@aws-cdk/core/test/docker-stub.sh +++ b/packages/@aws-cdk/core/test/docker-stub.sh @@ -6,6 +6,7 @@ set -euo pipefail # `/tmp/docker-stub.input` and accepts one of 3 commands that impact it's # behavior. +echo "$@" >> /tmp/docker-stub.input.concat echo "$@" > /tmp/docker-stub.input if echo "$@" | grep "DOCKER_STUB_SUCCESS_NO_OUTPUT"; then diff --git a/packages/@aws-cdk/core/test/test.bundling.ts b/packages/@aws-cdk/core/test/test.bundling.ts index 23be648de03b7..566e5c5008c25 100644 --- a/packages/@aws-cdk/core/test/test.bundling.ts +++ b/packages/@aws-cdk/core/test/test.bundling.ts @@ -1,7 +1,7 @@ import * as child_process from 'child_process'; import { Test } from 'nodeunit'; import * as sinon from 'sinon'; -import { BundlingDockerImage } from '../lib'; +import { BundlingDockerImage, FileSystem } from '../lib'; export = { 'tearDown'(callback: any) { @@ -55,6 +55,10 @@ export = { signal: null, }); + const imageHash = '123456abcdef'; + const fingerprintStub = sinon.stub(FileSystem, 'fingerprint'); + fingerprintStub.callsFake(() => imageHash); + const image = BundlingDockerImage.fromAsset('docker-path', { buildArgs: { TEST_ARG: 'cdk-test', @@ -119,4 +123,33 @@ export = { test.throws(() => image._run(), /\[Status -1\]/); test.done(); }, + + 'BundlerDockerImage json is the bundler image name by default'(test: Test) { + const image = BundlingDockerImage.fromRegistry('alpine'); + + test.equals(image.toJSON(), 'alpine'); + test.done(); + }, + + 'BundlerDockerImage json is the bundler image if building an image'(test: Test) { + const imageId = 'abcdef123456'; + sinon.stub(child_process, 'spawnSync').returns({ + status: 0, + stderr: Buffer.from('stderr'), + stdout: Buffer.from(`sha256:${imageId}`), + pid: 123, + output: ['stdout', 'stderr'], + signal: null, + }); + const imageHash = '123456abcdef'; + const fingerprintStub = sinon.stub(FileSystem, 'fingerprint'); + fingerprintStub.callsFake(() => imageHash); + + const image = BundlingDockerImage.fromAsset('docker-path'); + + test.equals(image.image, imageId); + test.equals(image.toJSON(), imageHash); + test.ok(fingerprintStub.calledWith('docker-path', sinon.match({ extraHash: JSON.stringify({}) }))); + test.done(); + }, }; diff --git a/packages/@aws-cdk/core/test/test.staging.ts b/packages/@aws-cdk/core/test/test.staging.ts index c2d050ba85e43..8b6c831231d8a 100644 --- a/packages/@aws-cdk/core/test/test.staging.ts +++ b/packages/@aws-cdk/core/test/test.staging.ts @@ -7,6 +7,7 @@ import * as sinon from 'sinon'; import { App, AssetHashType, AssetStaging, BundlingDockerImage, BundlingOptions, Stack } from '../lib'; const STUB_INPUT_FILE = '/tmp/docker-stub.input'; +const STUB_INPUT_CONCAT_FILE = '/tmp/docker-stub.input.concat'; enum DockerStubCommand { SUCCESS = 'DOCKER_STUB_SUCCESS', @@ -26,6 +27,9 @@ export = { if (fs.existsSync(STUB_INPUT_FILE)) { fs.unlinkSync(STUB_INPUT_FILE); } + if (fs.existsSync(STUB_INPUT_CONCAT_FILE)) { + fs.unlinkSync(STUB_INPUT_CONCAT_FILE); + } cb(); sinon.restore(); }, @@ -105,9 +109,6 @@ export = { const app = new App(); const stack = new Stack(app, 'stack'); const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); - const ensureDirSyncSpy = sinon.spy(fs, 'ensureDirSync'); - const mkdtempSyncSpy = sinon.spy(fs, 'mkdtempSync'); - const chmodSyncSpy = sinon.spy(fs, 'chmodSync'); const processStdErrWriteSpy = sinon.spy(process.stderr, 'write'); // WHEN @@ -126,25 +127,256 @@ export = { `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated -w /asset-input alpine DOCKER_STUB_SUCCESS`, ); test.deepEqual(fs.readdirSync(assembly.directory), [ - 'asset.2f37f937c51e2c191af66acf9b09f548926008ec68c575bd2ee54b6e997c0e00', + 'asset.b1e32e86b3523f2fa512eb99180ee2975a50a4439e63e8badd153f2a68d61aa4', 'cdk.out', 'manifest.json', 'stack.template.json', 'tree.json', ]); - // asset is bundled in a directory inside .cdk.staging - const stagingTmp = path.join('.', '.cdk.staging'); - test.ok(ensureDirSyncSpy.calledWith(stagingTmp)); - test.ok(mkdtempSyncSpy.calledWith(sinon.match(path.join(stagingTmp, 'asset-bundle-')))); - test.ok(chmodSyncSpy.calledWith(sinon.match(path.join(stagingTmp, 'asset-bundle-')), 0o777)); - // shows a message before bundling test.ok(processStdErrWriteSpy.calledWith('Bundling asset stack/Asset...\n')); test.done(); }, + 'bundler succeeds when staging is disabled'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'stack'); + stack.node.setContext(cxapi.DISABLE_ASSET_STAGING_CONTEXT, true); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + + // WHEN + new AssetStaging(stack, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + // THEN + const assembly = app.synth(); + + test.deepEqual(fs.readdirSync(assembly.directory), [ + 'asset.b1e32e86b3523f2fa512eb99180ee2975a50a4439e63e8badd153f2a68d61aa4', + 'cdk.out', + 'manifest.json', + 'stack.template.json', + 'tree.json', + ]); + + test.done(); + }, + + 'bundler reuses its output when it can'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'stack'); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + + // WHEN + new AssetStaging(stack, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + new AssetStaging(stack, 'AssetDuplicate', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + // THEN + const assembly = app.synth(); + + // We're testing that docker was run exactly once even though there are two bundling assets. + test.deepEqual( + readDockerStubInputConcat(), + `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated -w /asset-input alpine DOCKER_STUB_SUCCESS`, + ); + + test.deepEqual(fs.readdirSync(assembly.directory), [ + 'asset.b1e32e86b3523f2fa512eb99180ee2975a50a4439e63e8badd153f2a68d61aa4', + 'cdk.out', + 'manifest.json', + 'stack.template.json', + 'tree.json', + ]); + + test.done(); + }, + + 'bundler considers its options when reusing bundle output'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'stack'); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + + // WHEN + new AssetStaging(stack, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + new AssetStaging(stack, 'AssetWithDifferentBundlingOptions', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + environment: { + UNIQUE_ENV_VAR: 'SOMEVALUE', + }, + }, + }); + + // THEN + const assembly = app.synth(); + + // We're testing that docker was run twice - once for each set of bundler options + // operating on the same source asset. + test.deepEqual( + readDockerStubInputConcat(), + `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated -w /asset-input alpine DOCKER_STUB_SUCCESS\n` + + `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated --env UNIQUE_ENV_VAR=SOMEVALUE -w /asset-input alpine DOCKER_STUB_SUCCESS`, + ); + + test.deepEqual(fs.readdirSync(assembly.directory), [ + 'asset.b1e32e86b3523f2fa512eb99180ee2975a50a4439e63e8badd153f2a68d61aa4', // 'Asset' + 'asset.e80bb8f931b87e84975de193f5a7ecddd7558d3caf3d35d3a536d9ae6539234f', // 'AssetWithDifferentBundlingOptions' + 'cdk.out', + 'manifest.json', + 'stack.template.json', + 'tree.json', + ]); + + test.done(); + }, + + 'bundler outputs to intermediate dir and renames to asset'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'stack'); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + const mkdtempSyncSpy = sinon.spy(fs, 'mkdtempSync'); + const chmodSyncSpy = sinon.spy(fs, 'chmodSync'); + const renameSyncSpy = sinon.spy(fs, 'renameSync'); + + // WHEN + new AssetStaging(stack, 'Asset', { + sourcePath: directory, + assetHashType: AssetHashType.BUNDLE, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + // THEN + const assembly = app.synth(); + + test.ok(mkdtempSyncSpy.calledWith(sinon.match(path.join(assembly.directory, 'bundling-temp-')))); + test.ok(chmodSyncSpy.calledWith(sinon.match(path.join(assembly.directory, 'bundling-temp-')), 0o777)); + test.ok(renameSyncSpy.calledWith(sinon.match(path.join(assembly.directory, 'bundling-temp-')), sinon.match(path.join(assembly.directory, 'asset.')))); + + test.deepEqual(fs.readdirSync(assembly.directory), [ + 'asset.33cbf2cae5432438e0f046bc45ba8c3cef7b6afcf47b59d1c183775c1918fb1f', // 'Asset' + 'cdk.out', + 'manifest.json', + 'stack.template.json', + 'tree.json', + ]); + + test.done(); + }, + + 'bundling failure preserves the bundleDir for diagnosability'(test: Test) { + // GIVEN + const app = new App(); + const stack = new Stack(app, 'stack'); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + + // WHEN + test.throws(() => new AssetStaging(stack, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.FAIL], + }, + }), /Failed.*bundl.*asset.*-error/); + + // THEN + const assembly = app.synth(); + + const dir = fs.readdirSync(assembly.directory); + test.ok(dir.some(entry => entry.match(/asset.*-error/))); + + test.done(); + }, + + 'bundler re-uses assets from previous synths'(test: Test) { + // GIVEN + const TEST_OUTDIR = path.join(__dirname, 'cdk.out'); + if (fs.existsSync(TEST_OUTDIR)) { + fs.removeSync(TEST_OUTDIR); + } + + const app = new App({ outdir: TEST_OUTDIR }); + const stack = new Stack(app, 'stack'); + const directory = path.join(__dirname, 'fs', 'fixtures', 'test1'); + + // WHEN + new AssetStaging(stack, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + // GIVEN + const app2 = new App({ outdir: TEST_OUTDIR }); + const stack2 = new Stack(app2, 'stack'); + + // WHEN + new AssetStaging(stack2, 'Asset', { + sourcePath: directory, + bundling: { + image: BundlingDockerImage.fromRegistry('alpine'), + command: [DockerStubCommand.SUCCESS], + }, + }); + + // THEN + const appAssembly = app.synth(); + const app2Assembly = app2.synth(); + + test.deepEqual( + readDockerStubInputConcat(), + `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated -w /asset-input alpine DOCKER_STUB_SUCCESS`, + ); + + test.equals(appAssembly.directory, app2Assembly.directory); + test.deepEqual(fs.readdirSync(appAssembly.directory), [ + 'asset.b1e32e86b3523f2fa512eb99180ee2975a50a4439e63e8badd153f2a68d61aa4', + 'cdk.out', + 'manifest.json', + 'stack.template.json', + 'tree.json', + ]); + + test.done(); + }, + 'bundling throws when /asset-ouput is empty'(test: Test) { // GIVEN const app = new App(); @@ -228,10 +460,6 @@ export = { assetHash: 'my-custom-hash', assetHashType: AssetHashType.BUNDLE, }), /Cannot specify `bundle` for `assetHashType`/); - test.equal( - readDockerStubInput(), - `run --rm ${USER_ARG} -v /input:/asset-input:delegated -v /output:/asset-output:delegated -w /asset-input alpine DOCKER_STUB_SUCCESS`, - ); test.done(); }, @@ -316,7 +544,7 @@ export = { }); // THEN - test.ok(dir && /asset-bundle-/.test(dir)); + test.ok(dir && /asset.[0-9a-f]{16,}/.test(dir)); test.equals(opts?.command?.[0], DockerStubCommand.SUCCESS); test.throws(() => readDockerStubInput()); @@ -354,9 +582,20 @@ export = { }, }; +// Reads a docker stub and cleans the volume paths out of the stub. +function readAndCleanDockerStubInput(file: string) { + return fs + .readFileSync(file, 'utf-8') + .trim() + .replace(/-v ([^:]+):\/asset-input/g, '-v /input:/asset-input') + .replace(/-v ([^:]+):\/asset-output/g, '-v /output:/asset-output'); +} + +// Last docker input since last teardown function readDockerStubInput() { - const out = fs.readFileSync(STUB_INPUT_FILE, 'utf-8').trim(); - return out - .replace(/-v ([^:]+):\/asset-input/, '-v /input:/asset-input') - .replace(/-v ([^:]+):\/asset-output/, '-v /output:/asset-output'); + return readAndCleanDockerStubInput(STUB_INPUT_FILE); +} +// Concatenated docker inputs since last teardown +function readDockerStubInputConcat() { + return readAndCleanDockerStubInput(STUB_INPUT_CONCAT_FILE); } From c7f57a7bdad0dde79ae97da09621c92f4c52e4a7 Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Wed, 26 Aug 2020 16:11:07 -0700 Subject: [PATCH 39/42] chore(logs): update aws-sdk dependency in aws-logs (#9994) Updated the `aws-sdk` dependency to prevent build error form aws-logs. [Changes](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) to the `aws-sdk` have moved `RetryDelayOptions` [out](https://github.com/aws/aws-sdk-js/blob/9bd7fdbda9929d4f259996d468de80e210a4ce78/lib/config-base.d.ts) of `Config`. ---- *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-logs/README.md | 2 +- packages/@aws-cdk/aws-logs/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@aws-cdk/aws-logs/README.md b/packages/@aws-cdk/aws-logs/README.md index 8d86dfa65e1a7..f505023e1814b 100644 --- a/packages/@aws-cdk/aws-logs/README.md +++ b/packages/@aws-cdk/aws-logs/README.md @@ -246,4 +246,4 @@ const pattern = FilterPattern.spaceDelimited('time', 'component', '...', 'result Be aware that Log Group ARNs will always have the string `:*` appended to them, to match the behavior of [the CloudFormation `AWS::Logs::LogGroup` -resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#aws-resource-logs-loggroup-return-values). \ No newline at end of file +resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html#aws-resource-logs-loggroup-return-values). diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index 567b0a3708dee..1fbeeb100e682 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -65,7 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", - "aws-sdk": "^2.715.0", + "aws-sdk": "^2.739.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", From 8d71fa1a1a9ca7557fcd33bd93df1b357627baed Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Wed, 26 Aug 2020 16:35:51 -0700 Subject: [PATCH 40/42] feat(appsync): separating schema from graphql api (#9903) Separating GraphQL Schema from GraphQL Api to simplify GraphQL Api Props. `GraphQL Schema` is now its own class and employs static functions to construct GraphQL API. By default, GraphQL Api will be configured to a code-first approach. To override this, use the `schema` property to specify a method of schema declaration. For example, ```ts const api = appsync.GraphQLApi(stack, 'api', { name: 'myApi', schema: appsync.Schema.fromAsset(join(__dirname, 'schema.graphl')), }); ``` **BREAKING CHANGES**: AppSync GraphQL Schema declared through static functions as opposed to two separate properties - **appsync**: props `SchemaDefinition` and `SchemaDefinitionFile` have been condensed down to a singular property `schema` - **appsync**: no longer directly exposes `CfnGraphQLSchema` from `GraphQLApi.schema` ---- *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-appsync/README.md | 73 ++++- .../@aws-cdk/aws-appsync/lib/graphqlapi.ts | 100 ++----- packages/@aws-cdk/aws-appsync/lib/index.ts | 1 + packages/@aws-cdk/aws-appsync/lib/private.ts | 8 + .../@aws-cdk/aws-appsync/lib/schema-base.ts | 12 +- packages/@aws-cdk/aws-appsync/lib/schema.ts | 109 +++++++ .../aws-appsync/test/appsync-auth.test.ts | 69 ++--- .../test/appsync-code-first.test.ts | 282 +++++++++++++++++- .../aws-appsync/test/appsync-dynamodb.test.ts | 3 +- .../aws-appsync/test/appsync-grant.test.ts | 3 +- .../aws-appsync/test/appsync-http.test.ts | 3 +- .../test/appsync-interface-type.test.ts | 9 +- .../aws-appsync/test/appsync-lambda.test.ts | 3 +- .../aws-appsync/test/appsync-none.test.ts | 3 +- .../test/appsync-object-type.test.ts | 23 +- .../test/appsync-scalar-type.test.ts | 57 ++-- .../aws-appsync/test/appsync-schema.test.ts | 58 ++-- .../@aws-cdk/aws-appsync/test/appsync.test.ts | 45 +-- .../aws-appsync/test/integ.api-import.ts | 3 +- .../aws-appsync/test/integ.graphql-iam.ts | 5 +- .../test/integ.graphql-schema.expected.json | 2 +- .../aws-appsync/test/integ.graphql-schema.ts | 24 +- .../aws-appsync/test/integ.graphql.ts | 5 +- 23 files changed, 609 insertions(+), 291 deletions(-) create mode 100644 packages/@aws-cdk/aws-appsync/lib/schema.ts diff --git a/packages/@aws-cdk/aws-appsync/README.md b/packages/@aws-cdk/aws-appsync/README.md index d1f78b163d71c..88f059fc30b95 100644 --- a/packages/@aws-cdk/aws-appsync/README.md +++ b/packages/@aws-cdk/aws-appsync/README.md @@ -47,8 +47,7 @@ import * as db from '@aws-cdk/aws-dynamodb'; const api = new appsync.GraphQLApi(stack, 'Api', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'schema.graphql'), + schema: appsync.Schema.fromAsset(join(__dirname, 'schema.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM @@ -83,7 +82,53 @@ demoDS.createResolver({ }); ``` -## Imports +### Schema + +Every GraphQL Api needs a schema to define the Api. CDK offers `appsync.Schema` +for static convenience methods for various types of schema declaration: code-first +or schema-first. + +#### Code-First + +When declaring your GraphQL Api, CDK defaults to a code-first approach if the +`schema` property is not configured. + +```ts +const api = new appsync.GraphQLApi(stack, 'api', { name: 'myApi' }); +``` + +CDK will declare a `Schema` class that will give your Api access functions to +define your schema code-first: `addType`, `addObjectType`, `addToSchema`, etc. + +You can also declare your `Schema` class outside of your CDK stack, to define +your schema externally. + +```ts +const schema = new appsync.Schema(); +schema.addObjectType('demo', { + definition: { id: appsync.GraphqlType.id() }, +}); +const api = new appsync.GraphQLApi(stack, 'api', { + name: 'myApi', + schema +}); +``` + +See the [code-first schema](#Code-First-Schema) section for more details. + +#### Schema-First + +You can define your GraphQL Schema from a file on disk. For convenience, use +the `appsync.Schema.fromAsset` to specify the file representing your schema. + +```ts +const api = appsync.GraphQLApi(stack, 'api', { + name: 'myApi', + schema: appsync.Schema.fromAsset(join(__dirname, 'schema.graphl')), +}); +``` + +### Imports Any GraphQL Api that has been created outside the stack can be imported from another stack into your CDK app. Utilizing the `fromXxx` function, you have @@ -101,7 +146,7 @@ If you don't specify `graphqlArn` in `fromXxxAttributes`, CDK will autogenerate the expected `arn` for the imported api, given the `apiId`. For creating data sources and resolvers, an `apiId` is sufficient. -## Permissions +### Permissions When using `AWS_IAM` as the authorization type for GraphQL API, an IAM Role with correct permissions must be used for access to API. @@ -153,7 +198,7 @@ const api = new appsync.GraphQLApi(stack, 'API', { api.grant(role, appsync.IamResource.custom('types/Mutation/fields/updateExample'), 'appsync:GraphQL') ``` -### IamResource +#### IamResource In order to use the `grant` functions, you need to use the class `IamResource`. @@ -163,7 +208,7 @@ In order to use the `grant` functions, you need to use the class `IamResource`. - `IamResource.all()` permits ALL resources. -### Generic Permissions +#### Generic Permissions Alternatively, you can use more generic `grant` functions to accomplish the same usage. @@ -280,7 +325,6 @@ import * as schema from './object-types'; const api = new appsync.GraphQLApi(stack, 'Api', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, }); this.objectTypes = [ schema.Node, schema.Film ]; @@ -294,13 +338,12 @@ api.addType('Query', { args: schema.args, requestMappingTemplate: dummyRequest, responseMappingTemplate: dummyResponse, - }, + }), } - }); -}) +}); -this.objectTypes.map((t) => api.appendToSchema(t)); -Object.keys(filmConnections).forEach((key) => api.appendToSchema(filmConnections[key])); +this.objectTypes.map((t) => api.addType(t)); +Object.keys(filmConnections).forEach((key) => api.addType(filmConnections[key])); ``` Notice how we can utilize the `generateEdgeAndConnection` function to generate @@ -457,7 +500,6 @@ You can create Object Types in three ways: ```ts const api = new appsync.GraphQLApi(stack, 'Api', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, }); const demo = new appsync.ObjectType('Demo', { defintion: { @@ -466,7 +508,7 @@ You can create Object Types in three ways: }, }); - api.appendToSchema(object.toString()); + api.addType(object); ``` > This method allows for reusability and modularity, ideal for larger projects. For example, imagine moving all Object Type definition outside the stack. @@ -490,7 +532,7 @@ You can create Object Types in three ways: `cdk-stack.ts` - a file containing our cdk stack ```ts import { demo } from './object-types'; - api.appendToSchema(demo.toString()); + api.addType(demo); ``` 2. Object Types can be created ***externally*** from an Interface Type. @@ -513,7 +555,6 @@ You can create Object Types in three ways: ```ts const api = new appsync.GraphQLApi(stack, 'Api', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, }); api.addType('Demo', { defintion: { diff --git a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts index 0384899f1ba18..554bc3be77464 100644 --- a/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts +++ b/packages/@aws-cdk/aws-appsync/lib/graphqlapi.ts @@ -1,10 +1,10 @@ -import { readFileSync } from 'fs'; import { IUserPool } from '@aws-cdk/aws-cognito'; import { ManagedPolicy, Role, ServicePrincipal, Grant, IGrantable } from '@aws-cdk/aws-iam'; import { CfnResource, Construct, Duration, IResolvable, Stack } from '@aws-cdk/core'; import { CfnApiKey, CfnGraphQLApi, CfnGraphQLSchema } from './appsync.generated'; import { IGraphqlApi, GraphqlApiBase } from './graphqlapi-base'; -import { ObjectType, ObjectTypeProps } from './schema-intermediate'; +import { Schema } from './schema'; +import { IIntermediateType } from './schema-base'; /** * enum with all possible values for AppSync authorization type @@ -201,21 +201,6 @@ export interface LogConfig { readonly fieldLogLevel?: FieldLogLevel; } -/** - * Enum containing the different modes of schema definition - */ -export enum SchemaDefinition { - /** - * Define schema through functions like addType, addQuery, etc. - */ - CODE = 'CODE', - - /** - * Define schema in a file, i.e. schema.graphql - */ - FILE = 'FILE', -} - /** * Properties for an AppSync GraphQL API */ @@ -242,18 +227,13 @@ export interface GraphQLApiProps { /** * GraphQL schema definition. Specify how you want to define your schema. * - * SchemaDefinition.CODE allows schema definition through CDK - * SchemaDefinition.FILE allows schema definition through schema.graphql file + * Schema.fromFile(filePath: string) allows schema definition through schema.graphql file * - * @experimental - */ - readonly schemaDefinition: SchemaDefinition; - /** - * File containing the GraphQL schema definition. You have to specify a definition or a file containing one. + * @default - schema will be generated code-first (i.e. addType, addObjectType, etc.) * - * @default - Use schemaDefinition + * @experimental */ - readonly schemaDefinitionFile?: string; + readonly schema?: Schema; /** * A flag indicating whether or not X-Ray tracing is enabled for the GraphQL API. * @@ -390,9 +370,9 @@ export class GraphQLApi extends GraphqlApiBase { public readonly name: string; /** - * underlying CFN schema resource + * the schema attached to this api */ - public readonly schema: CfnGraphQLSchema; + public readonly schema: Schema; /** * the configured API key, if present @@ -401,9 +381,9 @@ export class GraphQLApi extends GraphqlApiBase { */ public readonly apiKey?: string; - private schemaMode: SchemaDefinition; + private schemaResource: CfnGraphQLSchema; private api: CfnGraphQLApi; - private _apiKey?: CfnApiKey; + private apiKeyResource?: CfnApiKey; constructor(scope: Construct, id: string, props: GraphQLApiProps) { super(scope, id); @@ -429,16 +409,16 @@ export class GraphQLApi extends GraphqlApiBase { this.arn = this.api.attrArn; this.graphQlUrl = this.api.attrGraphQlUrl; this.name = this.api.name; - this.schemaMode = props.schemaDefinition; - this.schema = this.defineSchema(props.schemaDefinitionFile); + this.schema = props.schema ?? new Schema(); + this.schemaResource = this.schema.bind(this); if (modes.some((mode) => mode.authorizationType === AuthorizationType.API_KEY)) { const config = modes.find((mode: AuthorizationMode) => { return mode.authorizationType === AuthorizationType.API_KEY && mode.apiKeyConfig; })?.apiKeyConfig; - this._apiKey = this.createAPIKey(config); - this._apiKey.addDependsOn(this.schema); - this.apiKey = this._apiKey.attrApiKey; + this.apiKeyResource = this.createAPIKey(config); + this.apiKeyResource.addDependsOn(this.schemaResource); + this.apiKey = this.apiKeyResource.attrApiKey; } } @@ -515,7 +495,7 @@ export class GraphQLApi extends GraphqlApiBase { * @param construct the dependee */ public addSchemaDependency(construct: CfnResource): boolean { - construct.addDependsOn(this.schema); + construct.addDependsOn(this.schemaResource); return true; } @@ -584,29 +564,6 @@ export class GraphQLApi extends GraphqlApiBase { }); } - /** - * Define schema based on props configuration - * @param file the file name/s3 location of Schema - */ - private defineSchema(file?: string): CfnGraphQLSchema { - let definition; - - if ( this.schemaMode === SchemaDefinition.FILE && !file) { - throw new Error('schemaDefinitionFile must be configured if using FILE definition mode.'); - } else if ( this.schemaMode === SchemaDefinition.FILE && file ) { - definition = readFileSync(file).toString('utf-8'); - } else if ( this.schemaMode === SchemaDefinition.CODE && !file ) { - definition = ''; - } else if ( this.schemaMode === SchemaDefinition.CODE && file) { - throw new Error('definition mode CODE is incompatible with file definition. Change mode to FILE/S3 or unconfigure schemaDefinitionFile'); - } - - return new CfnGraphQLSchema(this, 'Schema', { - apiId: this.apiId, - definition, - }); - } - /** * Escape hatch to append to Schema as desired. Will always result * in a newline. @@ -617,31 +574,18 @@ export class GraphQLApi extends GraphqlApiBase { * * @experimental */ - public appendToSchema(addition: string, delimiter?: string): void { - if ( this.schemaMode !== SchemaDefinition.CODE ) { - throw new Error('API cannot append to schema because schema definition mode is not configured as CODE.'); - } - const sep = delimiter ?? ''; - this.schema.definition = `${this.schema.definition}${sep}${addition}\n`; + public addToSchema(addition: string, delimiter?: string): void { + this.schema.addToSchema(addition, delimiter); } /** - * Add an object type to the schema + * Add type to the schema * - * @param name the name of the object type - * @param props the definition + * @param type the intermediate type to add to the schema * * @experimental */ - public addType(name: string, props: ObjectTypeProps): ObjectType { - if ( this.schemaMode !== SchemaDefinition.CODE ) { - throw new Error('API cannot add type because schema definition mode is not configured as CODE.'); - }; - const type = new ObjectType(name, { - definition: props.definition, - directives: props.directives, - }); - this.appendToSchema(type.toString()); - return type; + public addType(type: IIntermediateType): IIntermediateType { + return this.schema.addType(type); } } diff --git a/packages/@aws-cdk/aws-appsync/lib/index.ts b/packages/@aws-cdk/aws-appsync/lib/index.ts index 341312977c5d3..c4e05e9a5300e 100644 --- a/packages/@aws-cdk/aws-appsync/lib/index.ts +++ b/packages/@aws-cdk/aws-appsync/lib/index.ts @@ -4,6 +4,7 @@ export * from './key'; export * from './data-source'; export * from './mapping-template'; export * from './resolver'; +export * from './schema'; export * from './schema-intermediate'; export * from './schema-field'; export * from './schema-base'; diff --git a/packages/@aws-cdk/aws-appsync/lib/private.ts b/packages/@aws-cdk/aws-appsync/lib/private.ts index 9118b503349c3..696a0f0e7d5f6 100644 --- a/packages/@aws-cdk/aws-appsync/lib/private.ts +++ b/packages/@aws-cdk/aws-appsync/lib/private.ts @@ -4,6 +4,14 @@ function concatAndDedup(left: T[], right: T[]): T[] { }); } +/** + * Utility enum for Schema class + */ +export enum SchemaMode { + FILE = 'FILE', + CODE = 'CODE', +}; + /** * Utility class to represent DynamoDB key conditions. */ diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts index c3f67fe46a595..07659a9101dc1 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-base.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-base.ts @@ -1,5 +1,5 @@ import { Resolver } from './resolver'; -import { ResolvableFieldOptions } from './schema-field'; +import { ResolvableFieldOptions, BaseTypeOptions, GraphqlType } from './schema-field'; import { InterfaceType } from './schema-intermediate'; /** @@ -105,6 +105,16 @@ export interface IIntermediateType { */ readonly intermediateType?: InterfaceType; + /** + * Create an GraphQL Type representing this Intermediate Type + * + * @param options the options to configure this attribute + * - isList + * - isRequired + * - isRequiredList + */ + attribute(options?: BaseTypeOptions): GraphqlType; + /** * Generate the string of this object type */ diff --git a/packages/@aws-cdk/aws-appsync/lib/schema.ts b/packages/@aws-cdk/aws-appsync/lib/schema.ts new file mode 100644 index 0000000000000..7d3df6b569ae1 --- /dev/null +++ b/packages/@aws-cdk/aws-appsync/lib/schema.ts @@ -0,0 +1,109 @@ +import { readFileSync } from 'fs'; +import { Lazy } from '@aws-cdk/core'; +import { CfnGraphQLSchema } from './appsync.generated'; +import { GraphQLApi } from './graphqlapi'; +import { SchemaMode } from './private'; +import { IIntermediateType } from './schema-base'; + +/** + * The options for configuring a schema + * + * If no options are specified, then the schema will + * be generated code-first. + */ +export interface SchemaOptions { + /** + * The file path for the schema. When this option is + * configured, then the schema will be generated from an + * existing file from disk. + * + * @default - schema not configured through disk asset + */ + readonly filePath?: string, +}; + +/** + * The Schema for a GraphQL Api + * + * If no options are configured, schema will be generated + * code-first. + */ +export class Schema { + /** + * Generate a Schema from file + * + * @returns `SchemaAsset` with immutable schema defintion + * @param filePath the file path of the schema file + */ + public static fromAsset(filePath: string): Schema { + return new Schema({ filePath }); + } + + /** + * The definition for this schema + */ + public definition: string; + + protected schema?: CfnGraphQLSchema; + + private mode: SchemaMode; + + public constructor(options?: SchemaOptions) { + if (options?.filePath) { + this.mode = SchemaMode.FILE; + this.definition = readFileSync(options.filePath).toString('utf-8'); + } else { + this.mode = SchemaMode.CODE; + this.definition = ''; + } + } + + /** + * Called when the GraphQL Api is initialized to allow this object to bind + * to the stack. + * + * @param api The binding GraphQL Api + */ + public bind(api: GraphQLApi): CfnGraphQLSchema { + if (!this.schema) { + this.schema = new CfnGraphQLSchema(api, 'Schema', { + apiId: api.apiId, + definition: Lazy.stringValue({ produce: () => this.definition }), + }); + } + return this.schema; + } + + /** + * Escape hatch to add to Schema as desired. Will always result + * in a newline. + * + * @param addition the addition to add to schema + * @param delimiter the delimiter between schema and addition + * @default - '' + * + * @experimental + */ + public addToSchema(addition: string, delimiter?: string): void { + if (this.mode !== SchemaMode.CODE) { + throw new Error('API cannot append to schema because schema definition mode is not configured as CODE.'); + } + const sep = delimiter ?? ''; + this.definition = `${this.definition}${sep}${addition}\n`; + } + + /** + * Add type to the schema + * + * @param type the intermediate type to add to the schema + * + * @experimental + */ + public addType(type: IIntermediateType): IIntermediateType { + if (this.mode !== SchemaMode.CODE) { + throw new Error('API cannot add type because schema definition mode is not configured as CODE.'); + } + this.addToSchema(Lazy.stringValue({ produce: () => type.toString() })); + return type; + } +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts index 84cfa79aac5fd..e9ad68e4e66e0 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-auth.test.ts @@ -15,8 +15,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); // THEN @@ -27,8 +26,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [ @@ -45,8 +43,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, }, @@ -60,8 +57,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [], @@ -76,8 +72,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [{ @@ -97,8 +92,7 @@ describe('AppSync API Key Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [ @@ -125,8 +119,7 @@ describe('AppSync API Key Authorization', () => { expect(() => { new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.API_KEY, @@ -141,8 +134,7 @@ describe('AppSync API Key Authorization', () => { expect(() => { new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.API_KEY }, additionalAuthorizationModes: [{ @@ -158,8 +150,7 @@ describe('AppSync API Key Authorization', () => { expect(() => { new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [ @@ -177,8 +168,7 @@ describe('AppSync IAM Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, }, @@ -194,8 +184,7 @@ describe('AppSync IAM Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.IAM }], }, @@ -212,8 +201,7 @@ describe('AppSync IAM Authorization', () => { expect(() => { new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM }, additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.IAM }], @@ -227,8 +215,7 @@ describe('AppSync IAM Authorization', () => { expect(() => { new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [ { authorizationType: appsync.AuthorizationType.IAM }, @@ -249,8 +236,7 @@ describe('AppSync User Pool Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.USER_POOL, @@ -273,8 +259,7 @@ describe('AppSync User Pool Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.USER_POOL, @@ -303,8 +288,7 @@ describe('AppSync User Pool Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.USER_POOL, @@ -329,8 +313,7 @@ describe('AppSync User Pool Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.USER_POOL, @@ -360,8 +343,7 @@ describe('AppSync User Pool Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.USER_POOL, @@ -417,8 +399,7 @@ describe('AppSync OIDC Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.OIDC, @@ -440,8 +421,7 @@ describe('AppSync OIDC Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.OIDC, @@ -471,8 +451,7 @@ describe('AppSync OIDC Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.OIDC, @@ -496,8 +475,7 @@ describe('AppSync OIDC Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { additionalAuthorizationModes: [{ authorizationType: appsync.AuthorizationType.OIDC, @@ -529,8 +507,7 @@ describe('AppSync OIDC Authorization', () => { // WHEN new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.OIDC, diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts index 8258bbf38010e..0b39cab4c4c24 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-code-first.test.ts @@ -4,20 +4,207 @@ import * as appsync from '../lib'; import * as t from './scalar-type-defintions'; let stack: cdk.Stack; -let api: appsync.GraphQLApi; beforeEach(() => { // GIVEN stack = new cdk.Stack(); - api = new appsync.GraphQLApi(stack, 'api', { - name: 'api', - schemaDefinition: appsync.SchemaDefinition.CODE, +}); + +describe('code-first implementation through GraphQL Api functions`', () => { + let api: appsync.GraphQLApi; + beforeEach(() => { + // GIVEN + api = new appsync.GraphQLApi(stack, 'api', { + name: 'api', + }); + }); + + test('testing addType w/ Interface Type for schema definition mode `code`', () => { + // WHEN + const test = new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + }); + api.addType(test); + test.addField('dupid', t.dup_id); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addType w/ Object Type for schema definition mode `code`', () => { + // WHEN + const test = new appsync.ObjectType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + }); + api.addType(test); + test.addField('dupid', t.dup_id); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addObjectType for schema definition mode `code`', () => { + // WHEN + api.addType(new appsync.ObjectType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + dupid: t.dup_id, + }, + })); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('addField dynamically adds field to schema', () => { + // WHEN + const test = api.addType(new appsync.ObjectType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + })); + + test.addField('dupid', t.dup_id); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addInterfaceType for schema definition mode `code`', () => { + // WHEN + api.addType(new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + dupid: t.dup_id, + }, + })); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('addField dynamically adds field to schema', () => { + // WHEN + const test = api.addType(new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + })); + + test.addField('dupid', t.dup_id); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); }); }); -describe('testing addType for schema definition mode `code`', () => { - test('check scalar type id with all options', () => { +describe('code-first implementation through Schema functions`', () => { + let schema: appsync.Schema; + beforeEach(() => { + // GIVEN + schema = new appsync.Schema(); + }); + + test('testing addType w/ Interface Type for schema definition mode `code`', () => { // WHEN - api.addType('Test', { + const test = new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + }); + schema.addType(test); + test.addField('dupid', t.dup_id); + + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, + }); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addType w/ Object Type for schema definition mode `code`', () => { + // WHEN + const test = new appsync.ObjectType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + }); + schema.addType(test); + test.addField('dupid', t.dup_id); + + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, + }); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addObjectType for schema definition mode `code`', () => { + // WHEN + schema.addType(new appsync.ObjectType('Test', { definition: { id: t.id, lid: t.list_id, @@ -26,7 +213,13 @@ describe('testing addType for schema definition mode `code`', () => { rlrid: t.required_list_required_id, dupid: t.dup_id, }, + })); + + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, }); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; // THEN @@ -35,4 +228,77 @@ describe('testing addType for schema definition mode `code`', () => { }); }); -}); \ No newline at end of file + test('addField dynamically adds field to schema', () => { + // WHEN + const test = schema.addType(new appsync.ObjectType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + })); + + test.addField('dupid', t.dup_id); + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, + }); + const out = 'type Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('testing addInterfaceType for schema definition mode `code`', () => { + // WHEN + schema.addType(new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + dupid: t.dup_id, + }, + })); + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, + }); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); + + test('addField dynamically adds field to schema', () => { + // WHEN + const test = schema.addType(new appsync.InterfaceType('Test', { + definition: { + id: t.id, + lid: t.list_id, + rid: t.required_id, + rlid: t.required_list_id, + rlrid: t.required_list_required_id, + }, + })); + + test.addField('dupid', t.dup_id); + new appsync.GraphQLApi(stack, 'api', { + name: 'api', + schema, + }); + const out = 'interface Test {\n id: ID\n lid: [ID]\n rid: ID!\n rlid: [ID]!\n rlrid: [ID!]!\n dupid: [ID!]!\n}\n'; + + // THEN + expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { + Definition: `${out}`, + }); + }); +}); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts index 12d8d543c8556..e54a9576396d1 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-dynamodb.test.ts @@ -15,8 +15,7 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'baseApi', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts index 25ef663be23cc..44251cd7fabee 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-grant.test.ts @@ -15,8 +15,7 @@ beforeEach(() => { }); api = new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(join(__dirname, 'appsync.test.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: appsync.AuthorizationType.IAM, diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts index eac1415be5a67..899a76ebd19f4 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-http.test.ts @@ -11,8 +11,7 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'baseApi', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); endpoint = 'aws.amazon.com'; }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts index f6b2c35d31c2c..981ec8b60a039 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-interface-type.test.ts @@ -10,7 +10,6 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.CODE, }); }); @@ -25,7 +24,7 @@ describe('testing InterfaceType properties', () => { }); test('basic InterfaceType produces correct schema', () => { // WHEN - api.appendToSchema(baseTest.toString()); + api.addToSchema(baseTest.toString()); const out = 'interface baseTest {\n id: ID\n}\n'; // THEN @@ -40,7 +39,7 @@ describe('testing InterfaceType properties', () => { returnType: t.string, args: { success: t.int }, })); - api.appendToSchema(baseTest.toString()); + api.addToSchema(baseTest.toString()); const out = 'interface baseTest {\n id: ID\n test(success: Int): String\n}\n'; // THEN @@ -56,7 +55,7 @@ describe('testing InterfaceType properties', () => { args: { success: t.int }, dataSource: api.addNoneDataSource('none'), })); - api.appendToSchema(baseTest.toString()); + api.addToSchema(baseTest.toString()); const out = 'interface baseTest {\n id: ID\n test(success: Int): String\n}\n'; // THEN @@ -75,7 +74,7 @@ describe('testing InterfaceType properties', () => { test: graphqlType, }, }); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: baseTest\n}\n'; // THEN diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts index b4e35c0058e55..a67fd4b1691b7 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-lambda.test.ts @@ -11,8 +11,7 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'baseApi', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts index e391d16bfb6b2..f2b52c7dfba03 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-none.test.ts @@ -10,8 +10,7 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'baseApi', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts index 1d4359b735697..a60a5242f6fe7 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-object-type.test.ts @@ -10,7 +10,6 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.CODE, }); }); @@ -30,8 +29,8 @@ describe('testing Object Type properties', () => { directives: [appsync.Directive.custom('@test')], }); - api.appendToSchema(baseTest.toString()); - api.appendToSchema(objectTest.toString()); + api.addToSchema(baseTest.toString()); + api.addToSchema(objectTest.toString()); const gql_interface = 'interface baseTest {\n id: ID\n}\n'; const gql_object = 'type objectTest implements baseTest @test {\n id2: ID\n id: ID\n}\n'; const out = `${gql_interface}${gql_object}`; @@ -57,9 +56,9 @@ describe('testing Object Type properties', () => { }, }); - api.appendToSchema(baseTest.toString()); - api.appendToSchema(anotherTest.toString()); - api.appendToSchema(objectTest.toString()); + api.addToSchema(baseTest.toString()); + api.addToSchema(anotherTest.toString()); + api.addToSchema(objectTest.toString()); const gql_interface = 'interface baseTest {\n id: ID\n}\ninterface anotherTest {\n id2: ID\n}\n'; const gql_object = 'type objectTest implements anotherTest, baseTest {\n id3: ID\n id2: ID\n id: ID\n}\n'; @@ -84,7 +83,7 @@ describe('testing Object Type properties', () => { test: graphqlType, }, }); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: baseTest\n}\n'; // THEN @@ -108,7 +107,7 @@ describe('testing Object Type properties', () => { resolve: field, }, }); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: String\n resolve(arg: Int): String\n}\n'; // THEN @@ -132,7 +131,7 @@ describe('testing Object Type properties', () => { resolve: field, }, }); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: String\n resolve(arg: Int): String\n}\n'; // THEN @@ -155,7 +154,7 @@ describe('testing Object Type properties', () => { }), }, }); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); // THEN expect(stack).toHaveResourceLike('AWS::AppSync::Resolver', { @@ -182,7 +181,7 @@ describe('testing Object Type properties', () => { // test.addField('resolve', field); test.addField('dynamic', t.string); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: String\n resolve(arg: Int): String\n dynamic: String\n}\n'; // THEN @@ -215,7 +214,7 @@ describe('testing Object Type properties', () => { // test.addField('resolve', field); test.addField('dynamic', garbage.attribute()); - api.appendToSchema(test.toString()); + api.addToSchema(test.toString()); const out = 'type Test {\n test: String\n resolve(arg: Garbage): Garbage\n dynamic: Garbage\n}\n'; // THEN diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts index fb8165384d8b6..64fddd55bc3d3 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-scalar-type.test.ts @@ -10,18 +10,17 @@ beforeEach(() => { stack = new cdk.Stack(); api = new appsync.GraphQLApi(stack, 'api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.CODE, }); }); describe('testing all GraphQL Types', () => { test('scalar type id', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.id, }, - }); + })); const out = 'type Test {\n id: ID\n}\n'; // THEN @@ -32,11 +31,11 @@ describe('testing all GraphQL Types', () => { test('scalar type string', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.string, }, - }); + })); const out = 'type Test {\n id: String\n}\n'; // THEN @@ -47,11 +46,11 @@ describe('testing all GraphQL Types', () => { test('scalar type int', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.int, }, - }); + })); const out = 'type Test {\n id: Int\n}\n'; // THEN @@ -62,11 +61,11 @@ describe('testing all GraphQL Types', () => { test('scalar type float', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.float, }, - }); + })); const out = 'type Test {\n id: Float\n}\n'; // THEN @@ -77,11 +76,11 @@ describe('testing all GraphQL Types', () => { test('scalar type boolean', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.boolean, }, - }); + })); const out = 'type Test {\n id: Boolean\n}\n'; // THEN @@ -92,11 +91,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSDate', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsDate, }, - }); + })); const out = 'type Test {\n id: AWSDate\n}\n'; // THEN @@ -107,11 +106,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSTime', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsTime, }, - }); + })); const out = 'type Test {\n id: AWSTime\n}\n'; // THEN @@ -122,11 +121,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSDateTime', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsDateTime, }, - }); + })); const out = 'type Test {\n id: AWSDateTime\n}\n'; // THEN @@ -137,11 +136,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSTimestamp', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsTimestamp, }, - }); + })); const out = 'type Test {\n id: AWSTimestamp\n}\n'; // THEN @@ -152,11 +151,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSEmail', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsEmail, }, - }); + })); const out = 'type Test {\n id: AWSEmail\n}\n'; // THEN @@ -167,11 +166,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSJSON', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsJson, }, - }); + })); const out = 'type Test {\n id: AWSJSON\n}\n'; // THEN @@ -183,11 +182,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSUrl', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsUrl, }, - }); + })); const out = 'type Test {\n id: AWSURL\n}\n'; // THEN @@ -198,11 +197,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSPhone', () => { // WHEN - api.addType('Test', { + api.addType(new appsync.ObjectType('Test', { definition: { id: t.awsPhone, }, - }); + })); const out = 'type Test {\n id: AWSPhone\n}\n'; // THEN @@ -213,11 +212,11 @@ describe('testing all GraphQL Types', () => { test('scalar type AWSIPAddress', () => { // WHEN - api.addType('Test', { + api.addType( new appsync.ObjectType('Test', { definition: { id: t.awsIpAddress, }, - }); + })); const out = 'type Test {\n id: AWSIPAddress\n}\n'; // THEN diff --git a/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts index ee358b658fab3..b229061366117 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync-schema.test.ts @@ -21,7 +21,6 @@ describe('basic testing schema definition mode `code`', () => { // WHEN new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, }); // THEN @@ -30,33 +29,20 @@ describe('basic testing schema definition mode `code`', () => { }); }); - test('definition mode `code` generates correct schema with appendToSchema', () => { + test('definition mode `code` generates correct schema with addToSchema', () => { // WHEN const api = new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, }); - api.appendToSchema(type); - api.appendToSchema(query); - api.appendToSchema(mutation); + api.addToSchema(type); + api.addToSchema(query); + api.addToSchema(mutation); // THEN expect(stack).toHaveResourceLike('AWS::AppSync::GraphQLSchema', { Definition: `${type}\n${query}\n${mutation}\n`, }); }); - - test('definition mode `code` errors when schemaDefinitionFile is configured', () => { - // THEN - expect(() => { - new appsync.GraphQLApi(stack, 'API', { - name: 'demo', - schemaDefinition: appsync.SchemaDefinition.CODE, - schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), - }); - }).toThrowError('definition mode CODE is incompatible with file definition. Change mode to FILE/S3 or unconfigure schemaDefinitionFile'); - }); - }); describe('testing schema definition mode `file`', () => { @@ -65,8 +51,7 @@ describe('testing schema definition mode `file`', () => { // WHEN new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(join(__dirname, 'appsync.test.graphql')), }); // THEN @@ -75,43 +60,46 @@ describe('testing schema definition mode `file`', () => { }); }); - test('definition mode `file` errors when schemaDefinitionFile is not configured', () => { + test('definition mode `file` errors when addObjectType is called', () => { + // WHEN + const api = new appsync.GraphQLApi(stack, 'API', { + name: 'demo', + schema: appsync.Schema.fromAsset(join(__dirname, 'appsync.test.graphql')), + }); + // THEN expect(() => { - new appsync.GraphQLApi(stack, 'API', { - name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - }); - }).toThrowError('schemaDefinitionFile must be configured if using FILE definition mode.'); + api.addType(new appsync.ObjectType('blah', { + definition: { fail: t.id }, + })); + }).toThrowError('API cannot add type because schema definition mode is not configured as CODE.'); }); - test('definition mode `file` errors when addType is called', () => { + test('definition mode `file` errors when addInterfaceType is called', () => { // WHEN const api = new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(join(__dirname, 'appsync.test.graphql')), }); // THEN expect(() => { - api.addType('blah', { + api.addType(new appsync.InterfaceType('blah', { definition: { fail: t.id }, - }); + })); }).toThrowError('API cannot add type because schema definition mode is not configured as CODE.'); }); - test('definition mode `file` errors when appendToSchema is called', () => { + test('definition mode `file` errors when addToSchema is called', () => { // WHEN const api = new appsync.GraphQLApi(stack, 'API', { name: 'demo', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(join(__dirname, 'appsync.test.graphql')), }); // THEN expect(() => { - api.appendToSchema('blah'); + api.addToSchema('blah'); }).toThrowError('API cannot append to schema because schema definition mode is not configured as CODE.'); }); diff --git a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts index 9008f9b117d47..9dc6808a672e1 100644 --- a/packages/@aws-cdk/aws-appsync/test/appsync.test.ts +++ b/packages/@aws-cdk/aws-appsync/test/appsync.test.ts @@ -3,18 +3,19 @@ import '@aws-cdk/assert/jest'; import * as cdk from '@aws-cdk/core'; import * as appsync from '../lib'; -test('appsync should configure pipeline when pipelineConfig has contents', () => { - // GIVEN - const stack = new cdk.Stack(); - - // WHEN - const api = new appsync.GraphQLApi(stack, 'api', { +let stack: cdk.Stack; +let api: appsync.GraphQLApi; +beforeEach(() => { + stack = new cdk.Stack(); + api = new appsync.GraphQLApi(stack, 'api', { authorizationConfig: {}, name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); +}); +test('appsync should configure pipeline when pipelineConfig has contents', () => { + // WHEN new appsync.Resolver(stack, 'resolver', { api: api, typeName: 'test', @@ -30,17 +31,7 @@ test('appsync should configure pipeline when pipelineConfig has contents', () => }); test('appsync should configure resolver as unit when pipelineConfig is empty', () => { - // GIVEN - const stack = new cdk.Stack(); - // WHEN - const api = new appsync.GraphQLApi(stack, 'api', { - authorizationConfig: {}, - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - }); - new appsync.Resolver(stack, 'resolver', { api: api, typeName: 'test', @@ -54,17 +45,7 @@ test('appsync should configure resolver as unit when pipelineConfig is empty', ( }); test('appsync should configure resolver as unit when pipelineConfig is empty array', () => { - // GIVEN - const stack = new cdk.Stack(); - // WHEN - const api = new appsync.GraphQLApi(stack, 'api', { - authorizationConfig: {}, - name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), - }); - new appsync.Resolver(stack, 'resolver', { api: api, typeName: 'test', @@ -79,15 +60,11 @@ test('appsync should configure resolver as unit when pipelineConfig is empty arr }); test('when xray is enabled should not throw an Error', () => { - // GIVEN - const stack = new cdk.Stack(); - // WHEN - new appsync.GraphQLApi(stack, 'api', { + new appsync.GraphQLApi(stack, 'api-x-ray', { authorizationConfig: {}, name: 'api', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), xrayEnabled: true, }); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts index 74a8942246e51..b36c6a1bef7b1 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.api-import.ts @@ -24,8 +24,7 @@ const baseStack = new cdk.Stack(app, 'baseStack'); const baseApi = new appsync.GraphQLApi(baseStack, 'baseApi', { name: 'baseApi', - schemaDefinition: appsync.SchemaDefinition.FILE, - schemaDefinitionFile: path.join(__dirname, 'appsync.test.graphql'), + schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')), }); const stack = new cdk.Stack(app, 'stack'); diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts index 5c6dced5c21e1..0d4c95a10ea3f 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-iam.ts @@ -12,7 +12,7 @@ import { UserPoolDefaultAction, Values, IamResource, - SchemaDefinition, + Schema, } from '../lib'; /* @@ -38,8 +38,7 @@ const userPool = new UserPool(stack, 'Pool', { const api = new GraphQLApi(stack, 'Api', { name: 'Integ_Test_IAM', - schemaDefinition: SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'integ.graphql-iam.graphql'), + schema: Schema.fromAsset(join(__dirname, 'integ.graphql-iam.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: AuthorizationType.USER_POOL, diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json index 4527fed9237fd..0a6fc134d5511 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.expected.json @@ -16,7 +16,7 @@ "ApiId" ] }, - "Definition": "type Planet {\n name: String\n diameter: Int\n rotationPeriod: Int\n orbitalPeriod: Int\n gravity: String\n population: [String]\n climates: [String]\n terrains: [String]\n surfaceWater: Float\n created: String\n edited: String\n id: ID!\n}\ntype Species {\n name: String\n classification: String\n designation: String\n averageHeight: Float\n averageLifespan: Int\n eyeColors: [String]\n hairColors: [String]\n skinColors: [String]\n language: String\n homeworld: Planet\n created: String\n edited: String\n id: ID!\n}\n\ntype Query {\n getPlanets: [Planet]\n}\n" + "Definition": "interface Node {\n created: String\n edited: String\n id: ID!\n}\ntype Planet {\n name: String\n diameter: Int\n rotationPeriod: Int\n orbitalPeriod: Int\n gravity: String\n population: [String]\n climates: [String]\n terrains: [String]\n surfaceWater: Float\n created: String\n edited: String\n id: ID!\n}\ntype Species implements Node {\n name: String\n classification: String\n designation: String\n averageHeight: Float\n averageLifespan: Int\n eyeColors: [String]\n hairColors: [String]\n skinColors: [String]\n language: String\n homeworld: Planet\n created: String\n edited: String\n id: ID!\n}\n\ntype Query {\n getPlanets: [Planet]\n}\n" } }, "codefirstapiDefaultApiKey89863A80": { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts index ad840e93384e8..ae2057c68eb64 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql-schema.ts @@ -19,15 +19,26 @@ import * as ScalarType from './scalar-type-defintions'; const app = new cdk.App(); const stack = new cdk.Stack(app, 'code-first-schema'); +const schema = new appsync.Schema(); + +const node = schema.addType(new appsync.InterfaceType('Node', { + definition: { + created: ScalarType.string, + edited: ScalarType.string, + id: ScalarType.required_id, + }, +})); + const api = new appsync.GraphQLApi(stack, 'code-first-api', { name: 'api', - schemaDefinition: appsync.SchemaDefinition.CODE, + schema: schema, }); const planet = ObjectType.planet; -api.appendToSchema(planet.toString()); +schema.addToSchema(planet.toString()); -api.addType('Species', { +api.addType(new appsync.ObjectType('Species', { + interfaceTypes: [node], definition: { name: ScalarType.string, classification: ScalarType.string, @@ -39,13 +50,10 @@ api.addType('Species', { skinColors: ScalarType.list_string, language: ScalarType.string, homeworld: planet.attribute(), - created: ScalarType.string, - edited: ScalarType.string, - id: ScalarType.required_id, }, -}); +})); -api.appendToSchema('type Query {\n getPlanets: [Planet]\n}', '\n'); +api.addToSchema('type Query {\n getPlanets: [Planet]\n}', '\n'); const table = new db.Table(stack, 'table', { partitionKey: { diff --git a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts index 607a495d9b735..715864b209bc1 100644 --- a/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts +++ b/packages/@aws-cdk/aws-appsync/test/integ.graphql.ts @@ -8,9 +8,9 @@ import { KeyCondition, MappingTemplate, PrimaryKey, + Schema, UserPoolDefaultAction, Values, - SchemaDefinition, } from '../lib'; /* @@ -36,8 +36,7 @@ const userPool = new UserPool(stack, 'Pool', { const api = new GraphQLApi(stack, 'Api', { name: 'demoapi', - schemaDefinition: SchemaDefinition.FILE, - schemaDefinitionFile: join(__dirname, 'integ.graphql.graphql'), + schema: Schema.fromAsset(join(__dirname, 'integ.graphql.graphql')), authorizationConfig: { defaultAuthorization: { authorizationType: AuthorizationType.USER_POOL, From 0fc5899364b8fb3b2fac8cb774f103054607bb2e Mon Sep 17 00:00:00 2001 From: Nick Lynch Date: Thu, 27 Aug 2020 01:39:17 +0100 Subject: [PATCH 41/42] fix(lambda): grantInvoke fails on second invocation (#9960) If `grantInvoke()` is called twice for the same principal, the second call fails due to attempting to create two `CfnPermission` nodes with the same id. This (simple) fix skips the second creation if the node already exists. A more robust check would be to check the existing `CfnPermission`, comparing every field, skipping creation if the two are identical and throwing an error otherwise, as well as handling that in the upstream `grantInvoke` call. I opted for the simpler solution for now, but willing to take arguments for something more complex. I also nested the existing grantInvoke tests for future readability. The tests weren't changed, just the last one added. fixes #8553 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../@aws-cdk/aws-lambda/lib/function-base.ts | 57 +++-- .../@aws-cdk/aws-lambda/test/test.lambda.ts | 230 ++++++++++-------- 2 files changed, 166 insertions(+), 121 deletions(-) diff --git a/packages/@aws-cdk/aws-lambda/lib/function-base.ts b/packages/@aws-cdk/aws-lambda/lib/function-base.ts index be0b5fffd4d39..f7b048969b185 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function-base.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function-base.ts @@ -196,6 +196,12 @@ export abstract class FunctionBase extends Resource implements IFunction { private _latestVersion?: LatestVersion; + /** + * Mapping of invocation principals to grants. Used to de-dupe `grantInvoke()` calls. + * @internal + */ + protected _invocationGrants: Record = {}; + /** * Adds a permission to the Lambda resource policy. * @param id The id ƒor the permission construct @@ -272,29 +278,36 @@ export abstract class FunctionBase extends Resource implements IFunction { * Grant the given identity permissions to invoke this Lambda */ public grantInvoke(grantee: iam.IGrantable): iam.Grant { - return iam.Grant.addToPrincipalOrResource({ - grantee, - actions: ['lambda:InvokeFunction'], - resourceArns: [this.functionArn], - - // Fake resource-like object on which to call addToResourcePolicy(), which actually - // calls addPermission() - resource: { - addToResourcePolicy: (_statement) => { - // Couldn't add permissions to the principal, so add them locally. - const identifier = `Invoke${grantee.grantPrincipal}`; // calls the .toString() of the princpal - this.addPermission(identifier, { - principal: grantee.grantPrincipal!, - action: 'lambda:InvokeFunction', - }); - - return { statementAdded: true, policyDependable: this._functionNode().findChild(identifier) } as iam.AddToResourcePolicyResult; + const identifier = `Invoke${grantee.grantPrincipal}`; // calls the .toString() of the principal + + // Memoize the result so subsequent grantInvoke() calls are idempotent + let grant = this._invocationGrants[identifier]; + if (!grant) { + grant = iam.Grant.addToPrincipalOrResource({ + grantee, + actions: ['lambda:InvokeFunction'], + resourceArns: [this.functionArn], + + // Fake resource-like object on which to call addToResourcePolicy(), which actually + // calls addPermission() + resource: { + addToResourcePolicy: (_statement) => { + // Couldn't add permissions to the principal, so add them locally. + this.addPermission(identifier, { + principal: grantee.grantPrincipal!, + action: 'lambda:InvokeFunction', + }); + + return { statementAdded: true, policyDependable: this._functionNode().findChild(identifier) } as iam.AddToResourcePolicyResult; + }, + node: this.node, + stack: this.stack, + env: this.env, }, - node: this.node, - stack: this.stack, - env: this.env, - }, - }); + }); + this._invocationGrants[identifier] = grant; + } + return grant; } /** diff --git a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts index 651b5b192203c..2a86ee4bbfbe9 100644 --- a/packages/@aws-cdk/aws-lambda/test/test.lambda.ts +++ b/packages/@aws-cdk/aws-lambda/test/test.lambda.ts @@ -1020,120 +1020,152 @@ export = { test.done(); }, - 'grantInvoke adds iam:InvokeFunction'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const role = new iam.Role(stack, 'Role', { - assumedBy: new iam.AccountPrincipal('1234'), - }); - const fn = new lambda.Function(stack, 'Function', { - code: lambda.Code.fromInline('xxx'), - handler: 'index.handler', - runtime: lambda.Runtime.NODEJS_10_X, - }); + 'grantInvoke': { - // WHEN - fn.grantInvoke(role); + 'adds iam:InvokeFunction'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const role = new iam.Role(stack, 'Role', { + assumedBy: new iam.AccountPrincipal('1234'), + }); + const fn = new lambda.Function(stack, 'Function', { + code: lambda.Code.fromInline('xxx'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, + }); - // THEN - expect(stack).to(haveResource('AWS::IAM::Policy', { - PolicyDocument: { - Version: '2012-10-17', - Statement: [ - { - Action: 'lambda:InvokeFunction', - Effect: 'Allow', - Resource: { 'Fn::GetAtt': ['Function76856677', 'Arn'] }, - }, - ], - }, - })); + // WHEN + fn.grantInvoke(role); - test.done(); - }, + // THEN + expect(stack).to(haveResource('AWS::IAM::Policy', { + PolicyDocument: { + Version: '2012-10-17', + Statement: [ + { + Action: 'lambda:InvokeFunction', + Effect: 'Allow', + Resource: { 'Fn::GetAtt': ['Function76856677', 'Arn'] }, + }, + ], + }, + })); - 'grantInvoke with a service principal'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const fn = new lambda.Function(stack, 'Function', { - code: lambda.Code.fromInline('xxx'), - handler: 'index.handler', - runtime: lambda.Runtime.NODEJS_10_X, - }); - const service = new iam.ServicePrincipal('apigateway.amazonaws.com'); + test.done(); + }, - // WHEN - fn.grantInvoke(service); + 'with a service principal'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new lambda.Function(stack, 'Function', { + code: lambda.Code.fromInline('xxx'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, + }); + const service = new iam.ServicePrincipal('apigateway.amazonaws.com'); - // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { - Action: 'lambda:InvokeFunction', - FunctionName: { - 'Fn::GetAtt': [ - 'Function76856677', - 'Arn', - ], - }, - Principal: 'apigateway.amazonaws.com', - })); + // WHEN + fn.grantInvoke(service); - test.done(); - }, + // THEN + expect(stack).to(haveResource('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'Function76856677', + 'Arn', + ], + }, + Principal: 'apigateway.amazonaws.com', + })); - 'grantInvoke with an account principal'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const fn = new lambda.Function(stack, 'Function', { - code: lambda.Code.fromInline('xxx'), - handler: 'index.handler', - runtime: lambda.Runtime.NODEJS_10_X, - }); - const account = new iam.AccountPrincipal('123456789012'); + test.done(); + }, - // WHEN - fn.grantInvoke(account); + 'with an account principal'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new lambda.Function(stack, 'Function', { + code: lambda.Code.fromInline('xxx'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, + }); + const account = new iam.AccountPrincipal('123456789012'); - // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { - Action: 'lambda:InvokeFunction', - FunctionName: { - 'Fn::GetAtt': [ - 'Function76856677', - 'Arn', - ], - }, - Principal: '123456789012', - })); + // WHEN + fn.grantInvoke(account); - test.done(); - }, + // THEN + expect(stack).to(haveResource('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'Function76856677', + 'Arn', + ], + }, + Principal: '123456789012', + })); - 'grantInvoke with an arn principal'(test: Test) { - // GIVEN - const stack = new cdk.Stack(); - const fn = new lambda.Function(stack, 'Function', { - code: lambda.Code.fromInline('xxx'), - handler: 'index.handler', - runtime: lambda.Runtime.NODEJS_10_X, - }); - const account = new iam.ArnPrincipal('arn:aws:iam::123456789012:role/someRole'); + test.done(); + }, - // WHEN - fn.grantInvoke(account); + 'with an arn principal'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new lambda.Function(stack, 'Function', { + code: lambda.Code.fromInline('xxx'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, + }); + const account = new iam.ArnPrincipal('arn:aws:iam::123456789012:role/someRole'); - // THEN - expect(stack).to(haveResource('AWS::Lambda::Permission', { - Action: 'lambda:InvokeFunction', - FunctionName: { - 'Fn::GetAtt': [ - 'Function76856677', - 'Arn', - ], - }, - Principal: 'arn:aws:iam::123456789012:role/someRole', - })); + // WHEN + fn.grantInvoke(account); - test.done(); + // THEN + expect(stack).to(haveResource('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'Function76856677', + 'Arn', + ], + }, + Principal: 'arn:aws:iam::123456789012:role/someRole', + })); + + test.done(); + }, + + 'can be called twice for the same service principal'(test: Test) { + // GIVEN + const stack = new cdk.Stack(); + const fn = new lambda.Function(stack, 'Function', { + code: lambda.Code.fromInline('xxx'), + handler: 'index.handler', + runtime: lambda.Runtime.NODEJS_10_X, + }); + const service = new iam.ServicePrincipal('elasticloadbalancing.amazonaws.com'); + + // WHEN + fn.grantInvoke(service); + fn.grantInvoke(service); + + // THEN + expect(stack).to(haveResource('AWS::Lambda::Permission', { + Action: 'lambda:InvokeFunction', + FunctionName: { + 'Fn::GetAtt': [ + 'Function76856677', + 'Arn', + ], + }, + Principal: 'elasticloadbalancing.amazonaws.com', + })); + + test.done(); + }, }, 'Can use metricErrors on a lambda Function'(test: Test) { From 7c0e17016e8b598e7dfbfe287c56e4abd4c57416 Mon Sep 17 00:00:00 2001 From: AWS CDK Team Date: Thu, 27 Aug 2020 07:44:55 +0000 Subject: [PATCH 42/42] chore(release): 1.61.0 --- CHANGELOG.md | 169 ++++++++++++++++++++++++++++++--------------------- lerna.json | 2 +- 2 files changed, 101 insertions(+), 70 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c47a4abd210..2e18651f1b19c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,41 @@ 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.61.0](https://github.com/aws/aws-cdk/compare/v1.60.0...v1.61.0) (2020-08-27) + + +### Features + +* **appsync:** implement resolvable fields for code-first schema ([#9660](https://github.com/aws/aws-cdk/issues/9660)) ([9e3b798](https://github.com/aws/aws-cdk/commit/9e3b7981dc269e66f45e2ee4ca54d281a7945723)) +* **appsync:** separating schema from graphql api ([#9903](https://github.com/aws/aws-cdk/issues/9903)) ([8d71fa1](https://github.com/aws/aws-cdk/commit/8d71fa1a1a9ca7557fcd33bd93df1b357627baed)) +* **cli:** automatically determine region on EC2 instances ([#9313](https://github.com/aws/aws-cdk/issues/9313)) ([1cf986d](https://github.com/aws/aws-cdk/commit/1cf986d56f2cc8b72f94f4a7b52a309790ce4722)) +* **core:** facility to warn when deprecated APIs are used ([#9585](https://github.com/aws/aws-cdk/issues/9585)) ([b1d0ac0](https://github.com/aws/aws-cdk/commit/b1d0ac0564a86ab325e06b18670657ee9c953e3e)) +* **custom-resources:** function name for AwsCustomResource ([#9774](https://github.com/aws/aws-cdk/issues/9774)) ([6da6581](https://github.com/aws/aws-cdk/commit/6da6581c91e3f6fae83e45f7d374a42407e57a2f)), closes [#9771](https://github.com/aws/aws-cdk/issues/9771) +* **eks:** envelope encryption for secrets ([#9438](https://github.com/aws/aws-cdk/issues/9438)) ([65fd3e6](https://github.com/aws/aws-cdk/commit/65fd3e66ab3817f7e5051c5a8ae3c13b65415f63)), closes [#9140](https://github.com/aws/aws-cdk/issues/9140) +* **rds:** deletion protection for RDS cluster ([#9871](https://github.com/aws/aws-cdk/issues/9871)) ([ef98b9f](https://github.com/aws/aws-cdk/commit/ef98b9f3b82129540177a94dc1cca7340856ae38)), closes [#6944](https://github.com/aws/aws-cdk/issues/6944) +* **rds:** grantConnect for database instances ([#9887](https://github.com/aws/aws-cdk/issues/9887)) ([e893828](https://github.com/aws/aws-cdk/commit/e8938282b2649fa7c4aa126cc9bb7e8d28600d77)), closes [#1558](https://github.com/aws/aws-cdk/issues/1558) +* **region-info:** add information for af-south-1 and eu-south-1 regions ([#9569](https://github.com/aws/aws-cdk/issues/9569)) ([9d76c26](https://github.com/aws/aws-cdk/commit/9d76c267b4777852fcab797ee6f54880663f6569)) +* **s3:** imported buckets can have an explicit region ([#9936](https://github.com/aws/aws-cdk/issues/9936)) ([f0c76ac](https://github.com/aws/aws-cdk/commit/f0c76ac1f930fcbe7a2610e7aeeb4a46721516e1)), closes [#8280](https://github.com/aws/aws-cdk/issues/8280) [#9556](https://github.com/aws/aws-cdk/issues/9556) +* **stepfunctions-tasks:** add support for CodeBuild StartBuild API ([#9757](https://github.com/aws/aws-cdk/issues/9757)) ([dae54ec](https://github.com/aws/aws-cdk/commit/dae54eccf995c868ddfc839f9ab078169a34464f)), closes [#8043](https://github.com/aws/aws-cdk/issues/8043) + + +### Bug Fixes + +* **appsync:** add dependency between apikey and schema ([#9737](https://github.com/aws/aws-cdk/issues/9737)) ([4448794](https://github.com/aws/aws-cdk/commit/44487946489298902fc9d15ded31e24d19171a6f)), closes [#8168](https://github.com/aws/aws-cdk/issues/8168) [#9736](https://github.com/aws/aws-cdk/issues/9736) [#8168](https://github.com/aws/aws-cdk/issues/8168) +* **bootstrap:** add alias for the asset key ([#9872](https://github.com/aws/aws-cdk/issues/9872)) ([952e686](https://github.com/aws/aws-cdk/commit/952e686989875e53a819c68513bba77c7fdd5e91)), closes [#6719](https://github.com/aws/aws-cdk/issues/6719) +* **cfn-include:** allow numbers to be passed to string properties ([#9849](https://github.com/aws/aws-cdk/issues/9849)) ([4c8c6f1](https://github.com/aws/aws-cdk/commit/4c8c6f1b4f564c5f0ef6ae95f635da431b619257)), closes [#9784](https://github.com/aws/aws-cdk/issues/9784) +* **cfn-include:** short form for Condition ([#9865](https://github.com/aws/aws-cdk/issues/9865)) ([371e8da](https://github.com/aws/aws-cdk/commit/371e8da890061e61e71fef10eb262cd0bb1a25e0)), closes [#9785](https://github.com/aws/aws-cdk/issues/9785) +* **core:** Access Denied using legacy synthesizer with new bootstrap ([#9831](https://github.com/aws/aws-cdk/issues/9831)) ([960ef12](https://github.com/aws/aws-cdk/commit/960ef1237e8379090e78dca554401213c81d2be7)) +* **core:** Duration incorrectly renders Days ([#9935](https://github.com/aws/aws-cdk/issues/9935)) ([0ca09a7](https://github.com/aws/aws-cdk/commit/0ca09a75f3104a7e0d0e66a4b89496158fcbeee8)), closes [#9906](https://github.com/aws/aws-cdk/issues/9906) +* **elasticloadbalancingv2:** imported listener ignores conditions attribute ([#9939](https://github.com/aws/aws-cdk/issues/9939)) ([1c9b733](https://github.com/aws/aws-cdk/commit/1c9b73361983346caa62921867519e3cfcc6288e)), closes [#8385](https://github.com/aws/aws-cdk/issues/8385) [#9262](https://github.com/aws/aws-cdk/issues/9262) [#9320](https://github.com/aws/aws-cdk/issues/9320) [#9643](https://github.com/aws/aws-cdk/issues/9643) +* **lambda:** cannot use latest version in multiple cloudfront distributions ([#9966](https://github.com/aws/aws-cdk/issues/9966)) ([71c60f2](https://github.com/aws/aws-cdk/commit/71c60f20300790bd8f4fa898c8855d93d37d7cd9)), closes [#4459](https://github.com/aws/aws-cdk/issues/4459) +* **lambda:** grantInvoke fails on second invocation ([#9960](https://github.com/aws/aws-cdk/issues/9960)) ([0fc5899](https://github.com/aws/aws-cdk/commit/0fc5899364b8fb3b2fac8cb774f103054607bb2e)), closes [#8553](https://github.com/aws/aws-cdk/issues/8553) +* **lambda-nodejs:** incorrect working directory for local bundling ([#9870](https://github.com/aws/aws-cdk/issues/9870)) ([a4185a0](https://github.com/aws/aws-cdk/commit/a4185a0a2a5f95dfdfed656f5f16d49c95f7cf83)), closes [#9632](https://github.com/aws/aws-cdk/issues/9632) + ## [1.60.0](https://github.com/aws/aws-cdk/compare/v1.59.0...v1.60.0) (2020-08-19) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cloudfront:** Distribution: `.domains` must be specified if `certificate` is provided. * **appsync:** **appsync.addXxxDataSource** `name` and `description` props are now optional and in an `DataSourceOptions` interface. @@ -60,7 +91,7 @@ All notable changes to this project will be documented in this file. See [standa ## [1.59.0](https://github.com/aws/aws-cdk/compare/v1.58.0...v1.59.0) (2020-08-14) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **eks:** `cluster.addResource` was renamed to `cluster.addManifest` and `KubernetesResource` was renamed to `KubernetesManifest` * **cloudfront:** (cloudfront) Changed IDs for Distributions (will cause resource replacement). @@ -120,7 +151,7 @@ All notable changes to this project will be documented in this file. See [standa ## [1.57.0](https://github.com/aws/aws-cdk/compare/v1.56.0...v1.57.0) (2020-08-07) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **apigatewayv2:** The parameter for the method `bind()` on `IHttpRouteIntegration` has changed to accept one of type @@ -173,7 +204,7 @@ Related: https://github.com/aws/aws-cdk-rfcs/issues/192 ## [1.56.0](https://github.com/aws/aws-cdk/compare/v1.55.0...v1.56.0) (2020-07-31) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **appsync:** **appsync** prop `schemaDefinition` no longer takes string, instead it is required to configure schema definition mode. - **appsync**: schemaDefinition takes param `SchemaDefinition.XXX` to declare how schema will be configured @@ -203,7 +234,7 @@ Related: https://github.com/aws/aws-cdk-rfcs/issues/192 ## [1.55.0](https://github.com/aws/aws-cdk/compare/v1.54.0...v1.55.0) (2020-07-28) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **lambda:** the `bundlingDockerImage` prop of a `Runtime` now points to the AWS SAM build image (`amazon/aws-sam-cli-build-image-`) instead of the LambCI build image (`lambci/lambda:build-`) * **appsync:** `pipelineConfig` is now an array of `string` instead of `CfnResolver.PipelineConfigProperty` for usability. @@ -269,7 +300,7 @@ Related: https://github.com/aws/aws-cdk-rfcs/issues/192 ## [1.52.0](https://github.com/aws/aws-cdk/compare/v1.51.0...v1.52.0) (2020-07-18) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **rds:** the property 'version' has been changed from string to an engine-specific version class; use VersionClass.of() if you need to create a specific version of an engine from a string @@ -350,7 +381,7 @@ These can be specifed directly in the OpenAPI spec or via `addMethod()` ## [1.50.0](https://github.com/aws/aws-cdk/compare/v1.49.1...v1.50.0) (2020-07-07) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **eks:** `version` is now a mandatory property @@ -406,7 +437,7 @@ These can be specifed directly in the OpenAPI spec or via `addMethod()` ## [1.48.0](https://github.com/aws/aws-cdk/compare/v1.47.1...v1.48.0) (2020-07-01) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **stepfunctions-tasks:** `containerName` is not supported as an override anymore and has been replaced by `containerDefinition` * **stepfunctions-tasks:** `EvaluateExpression` is now a construct representing a task state rather than an embedded property called `task` @@ -458,7 +489,7 @@ vault with recovery points cannot be deleted. ## [1.47.0](https://github.com/aws/aws-cdk/compare/v1.46.0...v1.47.0) (2020-06-24) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **stepfunctions-tasks:** `Dynamo*` tasks no longer implement`IStepFunctionsTask` and have been replaced by constructs that can be instantiated directly. See README for examples @@ -482,7 +513,7 @@ vault with recovery points cannot be deleted. ## [1.46.0](https://github.com/aws/aws-cdk/compare/v1.45.0...v1.46.0) (2020-06-19) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **stepfunctions-tasks:** constructs for `EMR*` have been introduced to replace previous implementation which implemented `IStepFUnctionsTask`. @@ -555,7 +586,7 @@ use cluster.connections.securityGroups instead ## [1.45.0](https://github.com/aws/aws-cdk/compare/v1.44.0...v1.45.0) (2020-06-09) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **stepfunctions-tasks:** constructs for `SageMakerCreateTrainingJob` and `SageMakerCreateTransformJob` replace previous implementation that @@ -606,7 +637,7 @@ is now type `core.Size` ## [1.43.0](https://github.com/aws/aws-cdk/compare/v1.42.1...v1.43.0) (2020-06-03) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **rds:** the default retention policy for RDS Cluster and DbInstance is now 'Snapshot' * **cognito:** OAuth flows `authorizationCodeGrant` and @@ -655,7 +686,7 @@ by default. ## [1.42.0](https://github.com/aws/aws-cdk/compare/v1.41.0...v1.42.0) (2020-05-27) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cloudtrail:** API signatures of `addS3EventSelectors` and `addLambdaEventSelectors` have changed. Their parameters are now @@ -731,7 +762,7 @@ events. Two new APIs `logAllS3DataEvents()` and ## [1.39.0](https://github.com/aws/aws-cdk/compare/v1.38.0...v1.39.0) (2020-05-15) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cognito:** An invalid template placeholder has been removed from the default verification email body in a user pool. @@ -795,7 +826,7 @@ from the default verification email body in a user pool. ## [1.37.0](https://github.com/aws/aws-cdk/compare/v1.36.0...v1.37.0) (2020-05-05) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **amplify:** `mapSubDomain()` called with an empty string for `prefix` now maps to the domain root. @@ -844,7 +875,7 @@ maps to the domain root. ## [1.36.0](https://github.com/aws/aws-cdk/compare/v1.35.0...v1.36.0) (2020-04-28) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **stepfunctions-tasks:** `payload` in RunLambdaTask is now of type `TaskInput` and has a default of the state input instead of the empty object. You can migrate your current assignment to payload by supplying it to the `TaskInput.fromObject()` API @@ -868,7 +899,7 @@ You can migrate your current assignment to payload by supplying it to the `TaskI ## [1.35.0](https://github.com/aws/aws-cdk/compare/v1.34.1...v1.35.0) (2020-04-23) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **assets:** `cdk deploy` now needs `s3:ListBucket` instead of `s3:HeadObject`. * **efs:** Exported types no longer have the `Efs` prefix. @@ -901,7 +932,7 @@ You can migrate your current assignment to payload by supplying it to the `TaskI ## [1.34.0](https://github.com/aws/aws-cdk/compare/v1.33.1...v1.34.0) (2020-04-21) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **glue:** `DateFormat` constant names are now **UPPERCASE** (`JSON, AVRO, LOGSTASH, ...`) @@ -928,7 +959,7 @@ You can migrate your current assignment to payload by supplying it to the `TaskI ## [1.33.0](https://github.com/aws/aws-cdk/compare/v1.32.2...v1.33.0) (2020-04-17) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **kinesis:** `grantRead()` API no longer provides permissions to `kinesis:DescribeStream` as it provides permissions to `kinesis:DescribeStreamSummary` and `kinesis:SubscribeToShard` in it's place. If it's still desired, it can be added through the `grant()` API on the stream. * **kinesis:** `grantWrite()` API no longer has `DescribeStream` permissions as it has been replaced by `ListShards` for shard discovery @@ -980,7 +1011,7 @@ You can migrate your current assignment to payload by supplying it to the `TaskI ## [1.32.0](https://github.com/aws/aws-cdk/compare/v1.31.0...v1.32.0) (2020-04-07) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cognito:** `UserPoolClient` construct no longer has the property `userPoolClientClientSecret`. The functionality to retrieve the client @@ -1059,7 +1090,7 @@ was already configured for that user pool operation. ## [1.31.0](https://github.com/aws/aws-cdk/compare/v1.30.0...v1.31.0) (2020-03-24) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * .NET Core v3.1 is required with JSII v1.1 @@ -1100,7 +1131,7 @@ was already configured for that user pool operation. :rocket: To enable new CDK projects such as [CDK for Kubernetes](https://github.com/awslabs/cdk8s), we have released the **constructs programming model** as an independent library called [constructs](https://github.com/aws/constructs). The `@aws-cdk/core.Construct` class is now a subclass of the base `constructs.Construct`. -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cognito:** `UserPoolAttribute` has been removed. It is no longer required to defined a `UserPool`. @@ -1127,7 +1158,7 @@ required to defined a `UserPool`. ## [1.28.0](https://github.com/aws/aws-cdk/compare/v1.27.0...v1.28.0) (2020-03-16) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **batch:** `computeEnvironments` is now required * **batch:** the `allocationStrategy` property was moved from `ComputeEnvironmentProps` to the `ComputeResources` interface, which is where it semantically belongs. @@ -1176,7 +1207,7 @@ required to defined a `UserPool`. ## [1.27.0](https://github.com/aws/aws-cdk/compare/v1.26.0...v1.27.0) (2020-03-03) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cognito:** `UserPool.fromUserPoolAttributes()` has been replaced by `fromUserPoolId()` and `fromUserPoolArn()`. @@ -1227,7 +1258,7 @@ required to defined a `UserPool`. ## [1.26.0](https://github.com/aws/aws-cdk/compare/v1.25.0...v1.26.0) (2020-02-25) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **apigateway:** the interface now accepts endpointconfiguration property instead of endpoint type as defined by cfn * **lambda-nodejs:** `parcel-bundler` v1.x is now a peer dependency of `@aws-cdk/aws-lambda-nodejs`. Please add it to your `package.json`. @@ -1262,7 +1293,7 @@ required to defined a `UserPool`. ## [1.25.0](https://github.com/aws/aws-cdk/compare/v1.24.0...v1.25.0) (2020-02-18) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **appsync:** Changes `MappingTemplate.dynamoDbPutItem()` to accept `PrimaryKey` and `AttributeValues`, which allow configuring the primary @@ -1357,7 +1388,7 @@ key and to project an object to a set of attribute values. ## [1.22.0](https://github.com/aws/aws-cdk/compare/v1.21.1...v1.22.0) (2020-01-23) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **eks:** (experimental module) the `Mapping` struct was renamed to `AwsAuthMapping`. * **core:** Arn.parseArn now returns empty string for nullable Arn components. Users who were depending on an undefined value will now receive the falsy empty string. @@ -1431,7 +1462,7 @@ key and to project an object to a set of attribute values. ## [1.20.0](https://github.com/aws/aws-cdk/compare/v1.19.0...v1.20.0) (2020-01-07) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **autoscaling:** AutoScalingGroups without `desiredCapacity` are now initially scaled to their minimum capacity (instead of their maximum @@ -1496,7 +1527,7 @@ capaciety). ## [1.19.0](https://github.com/aws/aws-cdk/compare/v1.18.0...v1.19.0) (2019-12-17) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **route53:** the value of `hostedZoneId` will no longer include `/hostedzone/` prefix and only includes the hostedZoneId when using `HostedZone.fromLookup` or `fromHostedZoneAttributes` * **cloudfront:** (experimental module) `S3OriginConfig.originAccessIdentityId` or type `string` has been removed in favor of `S3OriginConfig.originAccessIdentity` of type `IOriginAccessIdentity`. @@ -1667,7 +1698,7 @@ GitHub issues for more information and workarounds where applicable. ## [1.16.0](https://github.com/aws/aws-cdk/compare/v1.15.0...v1.16.0) (2019-11-11) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **core:** template file names in `cdk.out` for new projects created by `cdk init` will use `stack.artifactId` instead of the physical stack name to enable multiple stacks to use the same name. In most cases the artifact ID is the same as the stack name. To enable this fix for old projects, add the context key `@aws-cdk/core:enableStackNameDuplicates: true` in your `cdk.json` file. @@ -1724,7 +1755,7 @@ In addition to the above, several bugs in the Python, .NET and Java release of t ## [1.15.0](https://github.com/aws/aws-cdk/compare/v1.14.0...v1.15.0) (2019-10-28) -### ⚠ BREAKING CHANGES +### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES * **rds:** `securityGroup: ec2.ISecurityGroup` is now `securityGroups: ec2.ISecurityGroup[]` in `DatabaseInstanceAttributes` * **rds:** removed `securityGroupId` from `IDatabaseInstance` @@ -1847,7 +1878,7 @@ In addition to the above, several bugs in the Python, .NET and Java release of t * **stepfunctions:** add support for Map state ([#4145](https://github.com/aws/aws-cdk/issues/4145)) ([c8f0bcf](https://github.com/aws/aws-cdk/commit/c8f0bcf)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cloudmap:** `cloudmap.Service.fromServiceAttributes` takes a newly required argument `namespace`. @@ -1923,7 +1954,7 @@ required argument `namespace`. * publish construct tree into the cloud assembly ([#4194](https://github.com/aws/aws-cdk/issues/4194)) ([3cca03d](https://github.com/aws/aws-cdk/commit/3cca03d)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **ses-actions:** adding an action to a receipt rule now requires an integration object from the `@aws-cdk/aws-ses-actions` package. @@ -1965,7 +1996,7 @@ object from the `@aws-cdk/aws-ses-actions` package. * **toolkit:** conditionally emit AWS::CDK::Metadata resource ([#3692](https://github.com/aws/aws-cdk/issues/3692)) ([5901d6e](https://github.com/aws/aws-cdk/commit/5901d6e)), closes [#3648](https://github.com/aws/aws-cdk/issues/3648) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **s3-deployment:** Property `source` is now `sources` and is a `Source` array @@ -2000,7 +2031,7 @@ object from the `@aws-cdk/aws-ses-actions` package. * **events:** allow passing a role to the CodePipeline target ([#4006](https://github.com/aws/aws-cdk/issues/4006)) ([c4054ce](https://github.com/aws/aws-cdk/commit/c4054ce)), closes [#3999](https://github.com/aws/aws-cdk/issues/3999) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **assets:** assets no longer expose a property `contentHash`. Use `sourceHash` as a good approximation. if you have a strong use case for content hashes, please @@ -2030,7 +2061,7 @@ raise a github issue and we will figure out a solution. * upgrade to CloudFormation specification 6.0.0 ([#3942](https://github.com/aws/aws-cdk/issues/3942)) ([27de0a0](https://github.com/aws/aws-cdk/commit/27de0a0)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **ecs,lambda,rds:** `securityGroupId: string` replaced by `securityGroup: ISecurityGroup` when importing a cluster/instance in `@aws-cdk/aws-rds` @@ -2086,7 +2117,7 @@ importing a cluster/instance in `@aws-cdk/aws-rds` * updated CloudFormation Resource specification 5.3.0 ([#3789](https://github.com/aws/aws-cdk/issues/3789)) ([39ee810](https://github.com/aws/aws-cdk/commit/39ee810)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **ec2:** By default, egress rules are not created anymore on imported security groups. This can be configured by setting `allowAllOutbound: false` upon importing. @@ -2115,7 +2146,7 @@ importing a cluster/instance in `@aws-cdk/aws-rds` * **events-targets:** allow specifying event for codebuild project target ([#3637](https://github.com/aws/aws-cdk/issues/3637)) ([c240e1e](https://github.com/aws/aws-cdk/commit/c240e1e)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **aws-cdk:** Java builders no longer use the "with" prefix. * **eks:** cluster name output will not be synthesized by default. instead we synthesize an output that includes the full `aws eks update-kubeconfig` command. You can enable synthesis of the cluster name output using the `outputClusterName: true` options. @@ -2182,7 +2213,7 @@ importing a cluster/instance in `@aws-cdk/aws-rds` * **s3-deployment:** CloudFront invalidation ([#3213](https://github.com/aws/aws-cdk/issues/3213)) ([e84bdd6](https://github.com/aws/aws-cdk/commit/e84bdd6)), closes [#3106](https://github.com/aws/aws-cdk/issues/3106) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **eks:** clusters will be created with a default capacity of x2 m5.large instances. You can specify `defaultCapacity: 0` if you wish to disable. @@ -2304,7 +2335,7 @@ and to continue working closely with the open-source community. * **assets:** packages `assets`, `aws-ecr-assets` and `aws-s3-assets` are now experimental instead of stable -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **codepipeline:** Pipeline.crossRegionReplicationBuckets is now experimental * **codepipeline:** Pipeline.crossRegionSupport is now experimental @@ -2334,7 +2365,7 @@ and to continue working closely with the open-source community. * **codebuild:** allow specifying principals and credentials for pulling build images. ([#3049](https://github.com/aws/aws-cdk/issues/3049)) ([3319fe5](https://github.com/aws/aws-cdk/commit/3319fe5)), closes [#2175](https://github.com/aws/aws-cdk/issues/2175) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **codebuild:** `LinuxBuildImage.fromDockerHub()` has been renamed to `fromDockerRegistry()` and `WindowsBuildImage.fromDockerHub()` has been renamed to `fromDockerRegistry()` * **iam:** `aws-iam.User` and `Group`: `managedPolicyArns` => @@ -2355,7 +2386,7 @@ and to continue working closely with the open-source community. * **stepfunctions:** Downscope SageMaker permissions ([#2991](https://github.com/aws/aws-cdk/issues/2991)) ([69c82c8](https://github.com/aws/aws-cdk/commit/69c82c8)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **core:** `construct.findChild()` now only looks up direct children * **ec2:** `Port.toRuleJSON` was renamed to `toRuleJson` @@ -2455,7 +2486,7 @@ and to continue working closely with the open-source community. * **issues:** new format for issue templates ([#2917](https://github.com/aws/aws-cdk/issues/2917)) ([67f6de0](https://github.com/aws/aws-cdk/commit/67f6de0)) * **sns:** add support for subscription filter policy ([#2778](https://github.com/aws/aws-cdk/issues/2778)) ([ae789ed](https://github.com/aws/aws-cdk/commit/ae789ed)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * *IMPORTANT*: previous versions of the CDK CLI will not be fully compatible with this version of the framework and vice versa. * **core:** the `@aws-cdk/cdk` module was renamed to `@aws-cdk/core`, **python:** `aws_cdk.core`, **java:** the artifact `cdk` in groupId `software.amazon.awscdk` was renamed to `core` @@ -2560,7 +2591,7 @@ and to continue working closely with the open-source community. * formalize the concept of physical names, and use them for cross-environment CodePipelines. ([#1924](https://github.com/aws/aws-cdk/issues/1924)) ([6daaca8](https://github.com/aws/aws-cdk/commit/6daaca8)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **assets:** `AssetProps.packaging` has been removed and is now automatically discovered based on the file type. * **assets:** `ZipDirectoryAsset` has been removed, use `aws-s3-assets.Asset`. @@ -2704,7 +2735,7 @@ package. * **tokens:** enable type coercion ([#2680](https://github.com/aws/aws-cdk/issues/2680)) ([0f54698](https://github.com/aws/aws-cdk/commit/0f54698)), closes [#2679](https://github.com/aws/aws-cdk/issues/2679) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **route53:** `recordValue: string` prop in `route53.TxtRecord` changed to `values: string[]` * `recordValue` prop in `route53.CnameRecord` renamed to `domainName` @@ -2776,7 +2807,7 @@ package. * **cloudwatch:** support all Y-Axis properties ([#2406](https://github.com/aws/aws-cdk/issues/2406)) ([8904c3e](https://github.com/aws/aws-cdk/commit/8904c3e)), closes [#2385](https://github.com/aws/aws-cdk/issues/2385) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **logs:** using a Lambda or Kinesis Stream as CloudWatch log subscription destination now requires an integration object from the `@aws-cdk/aws-logs-destinations` package. * **codepipeline-actions:** removed the `addPutJobResultPolicy` property when creating LambdaInvokeAction. @@ -2848,7 +2879,7 @@ package. * **toolkit:** show when new version is available ([#2484](https://github.com/aws/aws-cdk/issues/2484)) ([6cf4bd3](https://github.com/aws/aws-cdk/commit/6cf4bd3)), closes [#297](https://github.com/aws/aws-cdk/issues/297) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **route53-targets:** using a CloudFront Distribution or an ELBv2 Load Balancer as an Alias Record Target now requires an integration @@ -2935,7 +2966,7 @@ corresponding `fromXxx` methods to import them as needed. * **elbv2:** add fixed response support for application load balancers ([#2328](https://github.com/aws/aws-cdk/issues/2328)) ([750bc8b](https://github.com/aws/aws-cdk/commit/750bc8b)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * all `Foo.import` static methods are now `Foo.fromFooAttributes` * all `FooImportProps` structs are now called `FooAttributes` @@ -2971,7 +3002,7 @@ corresponding `fromXxx` methods to import them as needed. -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * `s3.Bucket.domainName` renamed to `s3.Bucket.bucketDomainName`. * `codedeploy.IXxxDeploymentConfig.deploymentConfigArn` is now a property and not a method. @@ -3042,7 +3073,7 @@ corresponding `fromXxx` methods to import them as needed. * **toolkit:** stage assets under .cdk.assets ([#2182](https://github.com/aws/aws-cdk/issues/2182)) ([2f74eb4](https://github.com/aws/aws-cdk/commit/2f74eb4)), closes [#1716](https://github.com/aws/aws-cdk/issues/1716) [#2096](https://github.com/aws/aws-cdk/issues/2096) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cloudwatch:** Renamed `MetricCustomization` to `MetricOptions`. * **codepipeline:** CodePipeline Actions no longer have the `outputArtifact` and `outputArtifacts` properties. @@ -3093,7 +3124,7 @@ corresponding `fromXxx` methods to import them as needed. * update CloudFormation resource spec to v2.29.0 ([#2170](https://github.com/aws/aws-cdk/issues/2170)) ([ebc490d](https://github.com/aws/aws-cdk/commit/ebc490d)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * The `secretsmanager.SecretString` class has been removed in favor of `cdk.SecretValue.secretsManager(id[, options])` * The following prop types have been changed from `string` to `cdk.SecretValue`: `codepipeline-actions.AlexaSkillDeployAction.clientSecret`, `codepipeline-actions.AlexaSkillDeployAction.refreshToken`, `codepipeline-actions.GitHubSourceAction.oauthToken`, `iam.User.password` @@ -3145,7 +3176,7 @@ corresponding `fromXxx` methods to import them as needed. * **toolkit:** introduce the concept of auto-deployed Stacks. ([#2046](https://github.com/aws/aws-cdk/issues/2046)) ([abacc66](https://github.com/aws/aws-cdk/commit/abacc66)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **lambda:** `cloudWatchLogsRetentionTimeDays` in `@aws-cdk/aws-cloudtrail` now uses a `logs.RetentionDays` instead of a `LogRetention`. @@ -3198,7 +3229,7 @@ on all objects, `subnetsToUse` has been renamed to `subnetType`. * add more directories excluded and treated as source in the JetBrains script. ([#1961](https://github.com/aws/aws-cdk/issues/1961)) ([a1df717](https://github.com/aws/aws-cdk/commit/a1df717)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * “toCloudFormation” is now internal and should not be called directly. Instead use “app.synthesizeStack” * **ecs:** `ContainerImage.fromDockerHub` has been renamed to `ContainerImage.fromRegistry`. @@ -3312,7 +3343,7 @@ on all objects, `subnetsToUse` has been renamed to `subnetType`. * **decdk:** Prototype for declarative CDK (decdk) ([#1618](https://github.com/aws/aws-cdk/pull/1618)) ([8713ac6](https://github.com/aws/aws-cdk/commit/8713ac6)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cloudtrail:** The `CloudTrail.addS3EventSelector` accepts an options object instead of only a `ReadWriteType` value. @@ -3385,7 +3416,7 @@ For ECS's `addDefaultAutoScalingGroupCapacity()`, `instanceCount` => * **ssm:** Add L2 resource for SSM Parameters ([#1515](https://github.com/aws/aws-cdk/issues/1515)) ([9858a64](https://github.com/aws/aws-cdk/commit/9858a64)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **cdk:** if you are using TagManager the API for this object has completely changed. You should no longer use TagManager directly, but instead replace this with Tag Aspects. `cdk.Tag` has been renamed to `cdk.CfnTag` to enable `cdk.Tag` to be the Tag Aspect. @@ -3434,7 +3465,7 @@ For ECS's `addDefaultAutoScalingGroupCapacity()`, `instanceCount` => * **toolkit:** disable colors if a terminal is not attached to stdout ([#1641](https://github.com/aws/aws-cdk/issues/1641)) ([58b4685](https://github.com/aws/aws-cdk/commit/58b4685)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **aws-codepipeline:** the `role` property in the CloudFormation Actions has been renamed to `deploymentRole`. * **aws-codepipeline:** the `role` property in the `app-delivery` package has been renamed to `deploymentRole`. @@ -3484,7 +3515,7 @@ communicate when this foundational work is complete. * **cloudformation:** stop generating legacy cloudformation resources ([#1493](https://github.com/aws/aws-cdk/issues/1493)) ([81b4174](https://github.com/aws/aws-cdk/commit/81b4174)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **Cross-stack references:** if you are using `export()` and `import()` to share constructs between stacks, you can stop doing that, instead of `FooImportProps` accept an `IFoo` directly on the consuming stack, and use that object as usual. * `ArnUtils.fromComponents()` and `ArnUtils.parse()` have been moved onto `Stack`. @@ -3529,7 +3560,7 @@ communicate when this foundational work is complete. * **iam:** CompositePrincipal and allow multiple principal types ([#1377](https://github.com/aws/aws-cdk/issues/1377)) ([b942ae5](https://github.com/aws/aws-cdk/commit/b942ae5)), closes [#1201](https://github.com/aws/aws-cdk/issues/1201) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **aws-cloudformation:** this changes the type of the `role` property in CFN CodePipeline Actions from `Role` to `IRole`. This is needed to use imported Roles when creating Actions. @@ -3569,7 +3600,7 @@ lower-case trailing `d`). * **toolkit:** include toolkit version in AWS::CDK::Metadata ([#1287](https://github.com/aws/aws-cdk/issues/1287)) ([5004f50](https://github.com/aws/aws-cdk/commit/5004f50)), closes [#1286](https://github.com/aws/aws-cdk/issues/1286) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **assert:** the behavior change of `haveResource` can cause tests to fail. If allowing extension of the expected values is the intended behavior, you can @@ -3601,7 +3632,7 @@ behavior. * Update to CloudFormation spec v2.16.0 ([#1280](https://github.com/aws/aws-cdk/issues/1280)) ([9df5c54](https://github.com/aws/aws-cdk/commit/9df5c54)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES * **aws-codebuild:** `ecr.RepositoryRef` has been replaced by `ecr.IRepository`, which means that `RepositoryRef.import` is now `Repository.import`. Futhermore, the CDK @@ -3659,7 +3690,7 @@ and is required instead of optional. - **toolkit:** improve diff user interface ([#1187](https://github.com/aws/aws-cdk/issues/1187)) ([9c3c5c7](https://github.com/aws/aws-cdk/commit/9c3c5c7)), closes [#1121](https://github.com/aws/aws-cdk/issues/1121) [#1120](https://github.com/aws/aws-cdk/issues/1120) - **aws-codepipeline**: switch to webhooks instead of polling by default for the GitHub ([#1074](https://github.com/aws/aws-cdk/issues/1074)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **aws-codebuild:** this changes the way CodeBuild Sources are constructed (we moved away from multiple parameters in the constructor, in favor of the more idiomatic property interface). - **aws-elasticloadbalancingv2:** `targetGroup.listenerDependency()` has been renamed to `targetGroup.loadBalancerDependency()`. @@ -3678,7 +3709,7 @@ and is required instead of optional. - **aws-codepipeline, aws-cloudformation:** support cross-region CloudFormation pipeline action ([#1152](https://github.com/aws/aws-cdk/issues/1152)) ([8e701ad](https://github.com/aws/aws-cdk/commit/8e701ad)) - **toolkit:** print available templates when --language is omitted ([#1159](https://github.com/aws/aws-cdk/issues/1159)) ([5726c45](https://github.com/aws/aws-cdk/commit/5726c45)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **aws-ec2:** Method signature of VpcPublicSubnet.addDefaultIGWRouteEntry changed in order to add a dependency on gateway attachment completing before creating the public route to the gateway. Instead of passing a gateway ID string, pass in a cloudformation.InternetGatewayResource object and a cloudformation.VPCGatewayAttachmentResource object. - If you were using `DockerHub.image()` to reference docker hub images, use `ContainerImage.fromDockerHub()` instead. @@ -3698,7 +3729,7 @@ and is required instead of optional. - **aws-route53:** route53 Alias record support ([#1131](https://github.com/aws/aws-cdk/issues/1131)) ([72f0124](https://github.com/aws/aws-cdk/commit/72f0124)) - **cdk:** allow Tokens to be encoded as lists ([#1144](https://github.com/aws/aws-cdk/issues/1144)) ([cd7947c](https://github.com/aws/aws-cdk/commit/cd7947c)), closes [#744](https://github.com/aws/aws-cdk/issues/744) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **aws-codedeploy:** this changes the API of the CodeDeploy Pipeline Action to take the DeploymentGroup AWS Construct as an argument instead of the names of the Application and Deployment Group. @@ -3752,7 +3783,7 @@ and is required instead of optional. - **toolkit:** deployment ui improvements ([#1067](https://github.com/aws/aws-cdk/issues/1067)) ([c832eaf](https://github.com/aws/aws-cdk/commit/c832eaf)) - Update to CloudFormation resource specification v2.11.0 -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - The ec2.Connections object has been changed to be able to manage multiple security groups. The relevant property has been changed from `securityGroup` to `securityGroups` (an array of security group objects). - **aws-codecommit:** this modifies the default behavior of the CodeCommit Action. It also changes the internal API contract between the aws-codepipeline-api module and the CodePipeline Actions in the service packages. @@ -3815,7 +3846,7 @@ $ cdk --version - **aws-sqs:** Add grantXxx() methods ([#1004](https://github.com/aws/aws-cdk/issues/1004)) ([8c90350](https://github.com/aws/aws-cdk/commit/8c90350)) - **core:** Pre-concatenate Fn::Join ([#967](https://github.com/aws/aws-cdk/issues/967)) ([33c32a8](https://github.com/aws/aws-cdk/commit/33c32a8)), closes [#916](https://github.com/aws/aws-cdk/issues/916) [#958](https://github.com/aws/aws-cdk/issues/958) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - DynamoDB AutoScaling: Instead of `addReadAutoScaling()`, call `autoScaleReadCapacity()`, and similar for write scaling. - CloudFormation resource usage: If you use L1s, you may need to change some `XxxName` properties back into `Name`. These will match the CloudFormation property names. @@ -3857,7 +3888,7 @@ $ cdk --version - **aws-s3-deployment:** bucket deployments ([#971](https://github.com/aws/aws-cdk/issues/971)) ([84d6876](https://github.com/aws/aws-cdk/commit/84d6876)), closes [#952](https://github.com/aws/aws-cdk/issues/952) [#953](https://github.com/aws/aws-cdk/issues/953) [#954](https://github.com/aws/aws-cdk/issues/954) - **docs:** added link to CloudFormation concepts ([#934](https://github.com/aws/aws-cdk/issues/934)) ([666bbba](https://github.com/aws/aws-cdk/commit/666bbba)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **aws-apigateway:** specifying a path no longer works. If you used to provide a '/', remove it. Otherwise, you will have to supply `proxy: false` and construct more complex resource paths yourself. - **aws-lambda:** The construct `lambda.InlineJavaScriptLambda` is no longer supported. Use `lambda.Code.inline` instead; `lambda.Runtime.NodeJS43Edge` runtime is removed. CloudFront docs [stipulate](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html#lambda-requirements-lambda-function-configuration) that you should use node6.10 or node8.10\. It is always possible to use any value by instantiating a `lambda.Runtime` object. @@ -3892,7 +3923,7 @@ Java (maven) | [`mvn versions:use-latest-versions`](https://www.m - **aws-cloudformation:** add permission management to CreateUpdate and Delete Stack CodePipeline Actions. ([#880](https://github.com/aws/aws-cdk/issues/880)) ([8b3ae43](https://github.com/aws/aws-cdk/commit/8b3ae43)) - **aws-codepipeline:** make input and output artifact names optional when creating Actions. ([#845](https://github.com/aws/aws-cdk/issues/845)) ([3d91c93](https://github.com/aws/aws-cdk/commit/3d91c93)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **aws-codepipeline:** this commit contains the following breaking changes: @@ -3980,7 +4011,7 @@ Java (maven) | [`mvn versions:use-latest-versions`](https://www.m - **toolkit:** Stop creating 'empty' stacks ([#779](https://github.com/aws/aws-cdk/issues/779)) ([1dddd8a](https://github.com/aws/aws-cdk/commit/1dddd8a)) - **aws-autoscaling, aws-ec2:** Tagging support for AutoScaling/SecurityGroup ([#766](https://github.com/aws/aws-cdk/issues/766)) ([3d48eb2](https://github.com/aws/aws-cdk/commit/3d48eb2)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **framework:** The `cdk.App` constructor doesn't accept any arguments, and `app.run()` does not return a `string` anymore. All AWS CDK apps in all languages would need to be modified to adhere to the new API of the `cdk.App` construct. @@ -4050,7 +4081,7 @@ bucketResource.addPropertyOverride('BucketName', 'NewerBucketName'); - **core:** resource overrides (escape hatch) ([#784](https://github.com/aws/aws-cdk/issues/784)) ([5054eef](https://github.com/aws/aws-cdk/commit/5054eef)), closes [#606](https://github.com/aws/aws-cdk/issues/606) - **toolkit:** stop creating 'empty' stacks ([#779](https://github.com/aws/aws-cdk/issues/779)) ([1dddd8a](https://github.com/aws/aws-cdk/commit/1dddd8a)) -### BREAKING CHANGES +### BREAKING CHANGES TO EXPERIMENTAL FEATURES - **cdk**: the constructor signature of `TagManager` has changed. `initialTags` is now passed inside a props object. - **util:** `@aws-cdk/util` is no longer available diff --git a/lerna.json b/lerna.json index 480b7635043ca..6cd02888d14d3 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "tools/*" ], "rejectCycles": "true", - "version": "1.60.0" + "version": "1.61.0" }