From 74d58715772075836dfc318f4a0231fa8491dba9 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Fri, 12 Apr 2019 16:43:18 +0200 Subject: [PATCH] chore: update to use JSII 0.9.0 (#2255) Update dependency versions in the right places, update docstrings to comply with new, stricter standards, update awslint to use new jsii-reflect API. BREAKING CHANGE: you will not be able to combine jsii libraries written against previous versions of jsii with this version of the CDK. --- packages/@aws-cdk/app-delivery/package.json | 4 +- packages/@aws-cdk/assets-docker/package.json | 5 +- packages/@aws-cdk/assets/package.json | 3 +- .../@aws-cdk/aws-apigateway/lib/restapi.ts | 2 +- .../aws-applicationautoscaling/package.json | 3 +- .../@aws-cdk/aws-autoscaling/package.json | 3 +- packages/@aws-cdk/aws-cloudfront/package.json | 5 +- packages/@aws-cdk/aws-cloudtrail/package.json | 4 +- .../@aws-cdk/aws-codebuild/lib/project.ts | 4 +- .../@aws-cdk/aws-codedeploy-api/package.json | 3 + .../lib/lambda/deployment-group.ts | 4 +- packages/@aws-cdk/aws-codedeploy/package.json | 3 +- .../@aws-cdk/aws-codepipeline/package.json | 3 +- packages/@aws-cdk/aws-cognito/package.json | 3 +- packages/@aws-cdk/aws-dynamodb/lib/table.ts | 4 +- packages/@aws-cdk/aws-ecs/package.json | 6 +- packages/@aws-cdk/aws-eks/lib/cluster.ts | 2 - .../aws-elasticloadbalancingv2/package.json | 3 +- packages/@aws-cdk/aws-events/package.json | 3 +- packages/@aws-cdk/aws-iam/lib/lazy-role.ts | 2 +- .../@aws-cdk/aws-iam/lib/policy-document.ts | 2 +- packages/@aws-cdk/aws-iam/lib/role.ts | 2 +- packages/@aws-cdk/aws-kinesis/lib/stream.ts | 3 +- .../aws-lambda-event-sources/package.json | 5 +- packages/@aws-cdk/aws-lambda/lib/function.ts | 2 +- packages/@aws-cdk/aws-lambda/package.json | 3 +- .../@aws-cdk/aws-quickstarts/package.json | 5 +- packages/@aws-cdk/aws-rds/package.json | 5 +- packages/@aws-cdk/aws-route53/package.json | 4 +- .../@aws-cdk/aws-s3-deployment/package.json | 6 +- packages/@aws-cdk/aws-s3/lib/bucket.ts | 2 +- .../@aws-cdk/aws-serverless/package-lock.json | 68 +++++++++---------- packages/@aws-cdk/aws-serverless/package.json | 6 +- packages/@aws-cdk/aws-sns/lib/topic-base.ts | 6 +- packages/@aws-cdk/aws-sqs/lib/queue-base.ts | 2 - packages/@aws-cdk/cdk/lib/cfn-element.ts | 4 +- packages/@aws-cdk/cdk/lib/cfn-output.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-parameter.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-rule.ts | 2 +- packages/@aws-cdk/cdk/lib/construct.ts | 8 +-- packages/@aws-cdk/cdk/lib/fn.ts | 2 +- packages/@aws-cdk/cdk/lib/include.ts | 2 +- packages/@aws-cdk/cdk/lib/stack.ts | 3 +- packages/@aws-cdk/runtime-values/lib/rtv.ts | 2 +- packages/@aws-cdk/runtime-values/package.json | 3 +- tools/awslint/lib/cfn-resources.ts | 10 +-- tools/awslint/lib/rules/resource.ts | 8 +-- tools/awslint/package-lock.json | 24 +++---- tools/awslint/package.json | 2 +- tools/cdk-build-tools/package-lock.json | 32 ++++----- tools/cdk-build-tools/package.json | 4 +- 51 files changed, 167 insertions(+), 133 deletions(-) diff --git a/packages/@aws-cdk/app-delivery/package.json b/packages/@aws-cdk/app-delivery/package.json index df47462c5b26a..cb3f299f3438f 100644 --- a/packages/@aws-cdk/app-delivery/package.json +++ b/packages/@aws-cdk/app-delivery/package.json @@ -74,7 +74,9 @@ "@aws-cdk/aws-codepipeline": "^0.28.0", "@aws-cdk/aws-codepipeline-actions": "^0.28.0", "@aws-cdk/aws-iam": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-codebuild": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/assets-docker/package.json b/packages/@aws-cdk/assets-docker/package.json index 3026076d33fa1..75ef7038086bc 100644 --- a/packages/@aws-cdk/assets-docker/package.json +++ b/packages/@aws-cdk/assets-docker/package.json @@ -80,7 +80,10 @@ "@aws-cdk/aws-iam": "^0.28.0", "@aws-cdk/assets": "^0.28.0", "@aws-cdk/aws-s3": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-cloudformation": "^0.28.0", + "@aws-cdk/aws-lambda": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index a2e2d66613d07..bd8b0f37eb994 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -78,7 +78,8 @@ "peerDependencies": { "@aws-cdk/aws-iam": "^0.28.0", "@aws-cdk/aws-s3": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts index 9c2d19be0f204..ce4b0419bba56 100644 --- a/packages/@aws-cdk/aws-apigateway/lib/restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/lib/restapi.ts @@ -157,7 +157,7 @@ export interface RestApiProps extends ResourceOptions { export class RestApi extends cdk.Construct implements IRestApi { /** * Imports an existing REST API resource. - * @param parent Parent construct + * @param scope Parent construct * @param id Construct ID * @param props Imported rest API properties */ diff --git a/packages/@aws-cdk/aws-applicationautoscaling/package.json b/packages/@aws-cdk/aws-applicationautoscaling/package.json index a584c26fd9e3e..fd618f41e1223 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/package.json +++ b/packages/@aws-cdk/aws-applicationautoscaling/package.json @@ -75,7 +75,8 @@ "peerDependencies": { "@aws-cdk/aws-cloudwatch": "^0.28.0", "@aws-cdk/aws-iam": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-autoscaling-common": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-autoscaling/package.json b/packages/@aws-cdk/aws-autoscaling/package.json index 18174f95c5626..8218b79cd663f 100644 --- a/packages/@aws-cdk/aws-autoscaling/package.json +++ b/packages/@aws-cdk/aws-autoscaling/package.json @@ -85,7 +85,8 @@ "@aws-cdk/aws-elasticloadbalancingv2": "^0.28.0", "@aws-cdk/aws-iam": "^0.28.0", "@aws-cdk/aws-sns": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-autoscaling-common": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-cloudfront/package.json b/packages/@aws-cdk/aws-cloudfront/package.json index 2faba6030aeb2..a7432f2f4d1be 100644 --- a/packages/@aws-cdk/aws-cloudfront/package.json +++ b/packages/@aws-cdk/aws-cloudfront/package.json @@ -78,7 +78,10 @@ "peerDependencies": { "@aws-cdk/aws-route53": "^0.28.0", "@aws-cdk/aws-s3": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-certificatemanager": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/aws-kms": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-cloudtrail/package.json b/packages/@aws-cdk/aws-cloudtrail/package.json index dda523a6fc725..0e6848a0c8ebb 100644 --- a/packages/@aws-cdk/aws-cloudtrail/package.json +++ b/packages/@aws-cdk/aws-cloudtrail/package.json @@ -78,7 +78,9 @@ "peerDependencies": { "@aws-cdk/aws-kms": "^0.28.0", "@aws-cdk/aws-logs": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/aws-s3": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 548ba56cf24c0..2a59aa28b2a12 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -567,8 +567,8 @@ export class Project extends ProjectBase { * has permissions to access the S3 Bucket of that Pipeline - * otherwise, builds in that Pipeline will always fail. * - * @param parent the parent Construct for this Construct - * @param name the logical name of this Construct + * @param scope the parent Construct for this Construct + * @param id the logical name of this Construct * @param props the properties of the referenced Project * @returns a reference to the existing Project */ diff --git a/packages/@aws-cdk/aws-codedeploy-api/package.json b/packages/@aws-cdk/aws-codedeploy-api/package.json index ce357ea3140e0..2e846dc4df8d6 100644 --- a/packages/@aws-cdk/aws-codedeploy-api/package.json +++ b/packages/@aws-cdk/aws-codedeploy-api/package.json @@ -66,5 +66,8 @@ "homepage": "https://github.com/awslabs/aws-cdk", "engines": { "node": ">= 8.10.0" + }, + "peerDependencies": { + "@aws-cdk/cdk": "^0.28.0" } } diff --git a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts index e661ad5bd5b2c..6308a656a37c1 100644 --- a/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/lib/lambda/deployment-group.ts @@ -200,7 +200,7 @@ export class LambdaDeploymentGroup extends cdk.Construct implements ILambdaDeplo /** * Associate a function to run after deployment completes. - * @param preHook function to run after deployment completes + * @param postHook function to run after deployment completes * @throws an error if a post-hook function is already configured */ public onPostHook(postHook: lambda.IFunction): void { @@ -215,7 +215,7 @@ export class LambdaDeploymentGroup extends cdk.Construct implements ILambdaDeplo /** * Grant a principal permission to codedeploy:PutLifecycleEventHookExecutionStatus * on this deployment group resource. - * @param principal to grant permission to + * @param grantee to grant permission to */ public grantPutLifecycleEventHookExecutionStatus(grantee: iam.IGrantable): iam.Grant { return iam.Grant.addToPrincipal({ diff --git a/packages/@aws-cdk/aws-codedeploy/package.json b/packages/@aws-cdk/aws-codedeploy/package.json index 46f5a91e3802a..5d9f7cb3a3862 100644 --- a/packages/@aws-cdk/aws-codedeploy/package.json +++ b/packages/@aws-cdk/aws-codedeploy/package.json @@ -87,7 +87,8 @@ "@aws-cdk/aws-codedeploy-api": "^0.28.0", "@aws-cdk/aws-iam": "^0.28.0", "@aws-cdk/aws-lambda": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-s3": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-codepipeline/package.json b/packages/@aws-cdk/aws-codepipeline/package.json index 359d657a6ad93..7065361a1293d 100644 --- a/packages/@aws-cdk/aws-codepipeline/package.json +++ b/packages/@aws-cdk/aws-codepipeline/package.json @@ -93,7 +93,8 @@ "construct-ctor:@aws-cdk/aws-codepipeline.CrossRegionScaffoldStack..params[0]", "construct-ctor:@aws-cdk/aws-codepipeline.CrossRegionScaffoldStack..params[1]", "export:@aws-cdk/aws-codepipeline.IPipeline", - "import-props-interface:@aws-cdk/aws-codepipeline.PipelineImportProps" + "import-props-interface:@aws-cdk/aws-codepipeline.PipelineImportProps", + "resource-attribute:@aws-cdk/aws-codepipeline.IPipeline.pipelineVersion" ] } } diff --git a/packages/@aws-cdk/aws-cognito/package.json b/packages/@aws-cdk/aws-cognito/package.json index 41521a638050a..102f57e8ec2d8 100644 --- a/packages/@aws-cdk/aws-cognito/package.json +++ b/packages/@aws-cdk/aws-cognito/package.json @@ -72,7 +72,8 @@ "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-lambda": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-dynamodb/lib/table.ts b/packages/@aws-cdk/aws-dynamodb/lib/table.ts index 0063db5787f66..65912651c6246 100644 --- a/packages/@aws-cdk/aws-dynamodb/lib/table.ts +++ b/packages/@aws-cdk/aws-dynamodb/lib/table.ts @@ -437,7 +437,7 @@ export class Table extends Construct { /** * Permits an IAM principal all data read operations from this table: * BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan. - * @param principal The principal to grant access to + * @param grantee The principal to grant access to */ public grantReadData(grantee: iam.IGrantable) { return this.grant(grantee, ...READ_DATA_ACTIONS); @@ -456,7 +456,7 @@ export class Table extends Construct { /** * Permits an IAM principal all data write operations to this table: * BatchWriteItem, PutItem, UpdateItem, DeleteItem. - * @param principal The principal to grant access to + * @param grantee The principal to grant access to */ public grantWriteData(grantee: iam.IGrantable) { return this.grant(grantee, ...WRITE_DATA_ACTIONS); diff --git a/packages/@aws-cdk/aws-ecs/package.json b/packages/@aws-cdk/aws-ecs/package.json index f613de1ea7960..43540d812c6a5 100644 --- a/packages/@aws-cdk/aws-ecs/package.json +++ b/packages/@aws-cdk/aws-ecs/package.json @@ -106,7 +106,11 @@ "@aws-cdk/aws-route53": "^0.28.0", "@aws-cdk/aws-secretsmanager": "^0.28.0", "@aws-cdk/aws-servicediscovery": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-cloudformation": "^0.28.0", + "@aws-cdk/aws-lambda": "^0.28.0", + "@aws-cdk/aws-sns": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index 8dcdd35f767f0..c694ac4567504 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -21,8 +21,6 @@ export interface ClusterProps { * * If you want to create public load balancers, this must include public subnets. * - * @example - * * For example, to only select private subnets, supply the following: * * ```ts diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json index 865750f894c9e..4970e40c619a0 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/package.json @@ -81,7 +81,8 @@ "@aws-cdk/aws-ec2": "^0.28.0", "@aws-cdk/aws-route53": "^0.28.0", "@aws-cdk/aws-s3": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-events/package.json b/packages/@aws-cdk/aws-events/package.json index 6e5277b59a74c..9fddbed20e182 100644 --- a/packages/@aws-cdk/aws-events/package.json +++ b/packages/@aws-cdk/aws-events/package.json @@ -71,7 +71,8 @@ }, "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-iam/lib/lazy-role.ts b/packages/@aws-cdk/aws-iam/lib/lazy-role.ts index 9b4a290b9fa1f..f7f7cc11a5f08 100644 --- a/packages/@aws-cdk/aws-iam/lib/lazy-role.ts +++ b/packages/@aws-cdk/aws-iam/lib/lazy-role.ts @@ -33,7 +33,7 @@ export class LazyRole extends cdk.Construct implements IRole { /** * Adds a permission to the role's default policy document. * If there is no default policy attached to this role, it will be created. - * @param permission The permission statement to add to the policy document + * @param statement The permission statement to add to the policy document */ public addToPolicy(statement: PolicyStatement): boolean { if (this.role) { diff --git a/packages/@aws-cdk/aws-iam/lib/policy-document.ts b/packages/@aws-cdk/aws-iam/lib/policy-document.ts index 21022bb5ee64c..0bd3d718d3f3d 100644 --- a/packages/@aws-cdk/aws-iam/lib/policy-document.ts +++ b/packages/@aws-cdk/aws-iam/lib/policy-document.ts @@ -345,7 +345,7 @@ export class PolicyStatement extends cdk.Token { * Adds a service principal to this policy statement. * * @param service the service name for which a service principal is requested (e.g: `s3.amazonaws.com`). - * @param region the region in which the service principal lives (defaults to the current stack's region). + * @param opts options for adding the service principal (such as specifying a principal in a different region) */ public addServicePrincipal(service: string, opts?: ServicePrincipalOpts): this { return this.addPrincipal(new ServicePrincipal(service, opts)); diff --git a/packages/@aws-cdk/aws-iam/lib/role.ts b/packages/@aws-cdk/aws-iam/lib/role.ts index dc20cdbf382d8..6d2696cb21b02 100644 --- a/packages/@aws-cdk/aws-iam/lib/role.ts +++ b/packages/@aws-cdk/aws-iam/lib/role.ts @@ -180,7 +180,7 @@ export class Role extends Construct implements IRole { /** * Adds a permission to the role's default policy document. * If there is no default policy attached to this role, it will be created. - * @param permission The permission statement to add to the policy document + * @param statement The permission statement to add to the policy document */ public addToPolicy(statement: PolicyStatement): boolean { if (!this.defaultPolicy) { diff --git a/packages/@aws-cdk/aws-kinesis/lib/stream.ts b/packages/@aws-cdk/aws-kinesis/lib/stream.ts index 1e86c62ad84bd..d2e29906e97c2 100644 --- a/packages/@aws-cdk/aws-kinesis/lib/stream.ts +++ b/packages/@aws-cdk/aws-kinesis/lib/stream.ts @@ -286,8 +286,7 @@ export class Stream extends StreamBase { * * @param scope The parent creating construct (usually `this`). * @param id The construct's name. - * @param ref A `StreamAttributes` object. Can be obtained from a call to - * `stream.export()`. + * @param props Stream import properties */ public static import(scope: cdk.Construct, id: string, props: StreamImportProps): IStream { return new ImportedStream(scope, id, props); diff --git a/packages/@aws-cdk/aws-lambda-event-sources/package.json b/packages/@aws-cdk/aws-lambda-event-sources/package.json index 84352368ac838..974f6f49f6148 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/package.json +++ b/packages/@aws-cdk/aws-lambda-event-sources/package.json @@ -80,7 +80,10 @@ "@aws-cdk/aws-lambda": "^0.28.0", "@aws-cdk/aws-s3": "^0.28.0", "@aws-cdk/aws-sns": "^0.28.0", - "@aws-cdk/aws-sqs": "^0.28.0" + "@aws-cdk/aws-sqs": "^0.28.0", + "@aws-cdk/aws-events": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/cdk": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-lambda/lib/function.ts b/packages/@aws-cdk/aws-lambda/lib/function.ts index 324783d9605e8..240daadfb7230 100644 --- a/packages/@aws-cdk/aws-lambda/lib/function.ts +++ b/packages/@aws-cdk/aws-lambda/lib/function.ts @@ -229,7 +229,7 @@ export class Function extends FunctionBase { * * Lambda.import(this, 'MyImportedFunction', { lambdaArn: new LambdaArn('arn:aws:...') }); * - * @param parent The parent construct + * @param scope The parent construct * @param id The name of the lambda construct * @param props A reference to a Lambda function. Can be created manually (see * example above) or obtained through a call to `lambda.export()`. diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 16b968b017767..b5e99b0f41305 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -102,7 +102,8 @@ "@aws-cdk/aws-s3-notifications": "^0.28.0", "@aws-cdk/aws-sqs": "^0.28.0", "@aws-cdk/aws-stepfunctions": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-quickstarts/package.json b/packages/@aws-cdk/aws-quickstarts/package.json index 782ee19cc2d22..65bf2412fc769 100644 --- a/packages/@aws-cdk/aws-quickstarts/package.json +++ b/packages/@aws-cdk/aws-quickstarts/package.json @@ -67,7 +67,10 @@ "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-ec2": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-cloudformation": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/aws-rds": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-rds/package.json b/packages/@aws-cdk/aws-rds/package.json index 48586de0e0d4b..cf1ecec7da04d 100644 --- a/packages/@aws-cdk/aws-rds/package.json +++ b/packages/@aws-cdk/aws-rds/package.json @@ -79,7 +79,10 @@ "@aws-cdk/aws-ec2": "^0.28.0", "@aws-cdk/aws-kms": "^0.28.0", "@aws-cdk/aws-secretsmanager": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/aws-lambda": "^0.28.0", + "@aws-cdk/aws-sam": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-route53/package.json b/packages/@aws-cdk/aws-route53/package.json index 6637f48dcd57f..31ce3ba532d66 100644 --- a/packages/@aws-cdk/aws-route53/package.json +++ b/packages/@aws-cdk/aws-route53/package.json @@ -75,7 +75,9 @@ "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-ec2": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-logs": "^0.28.0", + "@aws-cdk/cx-api": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 4a9d005acbf10..0e6eb62341777 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -89,7 +89,11 @@ "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-s3": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/assets": "^0.28.0", + "@aws-cdk/aws-cloudformation": "^0.28.0", + "@aws-cdk/aws-iam": "^0.28.0", + "@aws-cdk/aws-lambda": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 5357dbe754dc4..c154f746f9fa9 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -643,7 +643,7 @@ export class Bucket extends BucketBase { /** * Creates a Bucket construct that represents an external bucket. * - * @param parent The parent creating construct (usually `this`). + * @param scope The parent creating construct (usually `this`). * @param id The construct's name. * @param props A `BucketAttributes` object. Can be obtained from a call to * `bucket.export()` or manually created. diff --git a/packages/@aws-cdk/aws-serverless/package-lock.json b/packages/@aws-cdk/aws-serverless/package-lock.json index cb6dd241cad10..d744b436eca91 100644 --- a/packages/@aws-cdk/aws-serverless/package-lock.json +++ b/packages/@aws-cdk/aws-serverless/package-lock.json @@ -1,6 +1,6 @@ { "name": "@aws-cdk/aws-serverless", - "version": "0.27.0", + "version": "0.28.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -20,9 +20,9 @@ } }, "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "case": { @@ -67,9 +67,9 @@ "dev": true }, "codemaker": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.8.2.tgz", - "integrity": "sha512-agUY157vcCXFnJ9gDM8/iKbq62PWHkccnztbeuS1NZ8Pm9Z13Z9FHMuXWrh/zOQjggXpr5y3pPBpCHOlDYnHLw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.9.0.tgz", + "integrity": "sha512-ZFaGAyhg7+jss1vrnFaDRNLA2zDxEn9GVmMextVINg9fZZ+URnUNrnepHSOfNpAFlds/FqhcNsGytpCHfcYCDA==", "dev": true, "requires": { "camelcase": "^5.2.0", @@ -243,16 +243,16 @@ "dev": true }, "jsii": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.8.2.tgz", - "integrity": "sha512-VbRwBFWlmWDoiNoNreX96ii37LEwviFvfSyTY37tMZFXs8QSG5NIrR66JmNaF/ejbQpubqAKxW/Nb/YWCqhRbg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.9.0.tgz", + "integrity": "sha512-7eVdKZ3Db5kgTRmNVmdljMx2ihVRFEaVrCKwsr3JwQ8eUlKg0p21P9cSeYb2wdX8NTMyW7+CI4IoiT9ksUtypA==", "dev": true, "requires": { "case": "^1.6.1", "colors": "^1.3.3", "deep-equal": "^1.0.1", "fs-extra": "^7.0.1", - "jsii-spec": "^0.8.2", + "jsii-spec": "^0.9.0", "log4js": "^4.0.2", "semver": "^5.6.0", "sort-json": "^2.0.0", @@ -262,25 +262,25 @@ } }, "jsii-pacmak": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.8.2.tgz", - "integrity": "sha512-guqjntPr9uVkGGR+4fAralIoHpPsdCLsQsDf7Kh3GCRjgLn20JeHBgv4vT6Wym0nqjqL/5fY4nsXI/9w/OVZ0A==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.9.0.tgz", + "integrity": "sha512-IKbTr2XFHXWlAH7dXzRdTwlZFtfQWUJtK3JFP6gRp6VKyD/G8lWogS4fTrUxStamndW6YZbe8w9vKkl0RB3T1Q==", "dev": true, "requires": { "clone": "^2.1.2", - "codemaker": "^0.8.2", + "codemaker": "^0.9.0", "escape-string-regexp": "^1.0.5", "fs-extra": "^7.0.1", - "jsii-spec": "^0.8.2", + "jsii-spec": "^0.9.0", "spdx-license-list": "^5.0.0", "xmlbuilder": "^11.0.0", "yargs": "^13.2.2" } }, "jsii-spec": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.8.2.tgz", - "integrity": "sha512-eDL96xDOMwk5tzSBqbOi1Hh17Y42eLyovoo4CEcwaHpBRR0mSccPyjXyjAEWJVMg1yyA2UEX0DrPgJa2yY7oeQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.9.0.tgz", + "integrity": "sha512-/rBjM33smY1FS8W4Fwvref5EjodNsza/4zP0k6amUNRKmm+9veNbt6Vfw0FcstclNEguiPTvsiboA8E1htrvEw==", "dev": true, "requires": { "jsonschema": "^1.2.4" @@ -349,9 +349,9 @@ } }, "mem": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", - "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { "map-age-cleaner": "^0.1.1", @@ -360,9 +360,9 @@ } }, "mimic-fn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz", - "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, "minimist": { @@ -431,9 +431,9 @@ "dev": true }, "p-is-promise": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", - "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", "dev": true }, "p-limit": { @@ -455,9 +455,9 @@ } }, "p-try": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", - "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "path-exists": { @@ -618,9 +618,9 @@ "dev": true }, "typescript": { - "version": "3.3.4000", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz", - "integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.3.tgz", + "integrity": "sha512-FFgHdPt4T/duxx6Ndf7hwgMZZjZpB+U0nMNGVCYPq0rEzWKjEDobm4J6yb3CS7naZ0yURFqdw9Gwc7UOh/P9oQ==", "dev": true }, "universalify": { diff --git a/packages/@aws-cdk/aws-serverless/package.json b/packages/@aws-cdk/aws-serverless/package.json index d3de4148cae51..f973d8c016878 100644 --- a/packages/@aws-cdk/aws-serverless/package.json +++ b/packages/@aws-cdk/aws-serverless/package.json @@ -46,8 +46,8 @@ }, "license": "Apache-2.0", "devDependencies": { - "jsii": "^0.8.2", - "jsii-pacmak": "^0.8.2" + "jsii": "^0.9.0", + "jsii-pacmak": "^0.9.0" }, "dependencies": { "@aws-cdk/aws-sam": "^0.28.0", @@ -60,4 +60,4 @@ "engines": { "node": ">= 8.10.0" } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-sns/lib/topic-base.ts b/packages/@aws-cdk/aws-sns/lib/topic-base.ts index f455cb8648dcb..73e1cd063330c 100644 --- a/packages/@aws-cdk/aws-sns/lib/topic-base.ts +++ b/packages/@aws-cdk/aws-sns/lib/topic-base.ts @@ -36,7 +36,6 @@ export interface ITopic extends * The queue resource policy will be updated to allow this SNS topic to send * messages to the queue. * - * @param name The subscription name * @param queue The target queue * @param rawMessageDelivery Enable raw message delivery */ @@ -48,7 +47,6 @@ export interface ITopic extends * The Lambda's resource policy will be updated to allow this topic to * invoke the function. * - * @param name A name for the subscription * @param lambdaFunction The Lambda function to invoke */ subscribeLambda(lambdaFunction: lambda.IFunction): Subscription; @@ -58,7 +56,7 @@ export interface ITopic extends * * @param name A name for the subscription * @param emailAddress The email address to use. - * @param jsonFormat True if the email content should be in JSON format (default is false). + * @param options Options to use for email subscription */ subscribeEmail(name: string, emailAddress: string, options?: EmailSubscriptionOptions): Subscription; @@ -135,7 +133,6 @@ export abstract class TopicBase extends cdk.Construct implements ITopic { * The queue resource policy will be updated to allow this SNS topic to send * messages to the queue. * - * @param name The subscription name * @param queue The target queue * @param rawMessageDelivery Enable raw message delivery */ @@ -176,7 +173,6 @@ export abstract class TopicBase extends cdk.Construct implements ITopic { * The Lambda's resource policy will be updated to allow this topic to * invoke the function. * - * @param name A name for the subscription * @param lambdaFunction The Lambda function to invoke */ public subscribeLambda(lambdaFunction: lambda.IFunction): Subscription { diff --git a/packages/@aws-cdk/aws-sqs/lib/queue-base.ts b/packages/@aws-cdk/aws-sqs/lib/queue-base.ts index 1a281b5691fdd..d8d7dec2a499a 100644 --- a/packages/@aws-cdk/aws-sqs/lib/queue-base.ts +++ b/packages/@aws-cdk/aws-sqs/lib/queue-base.ts @@ -81,7 +81,6 @@ export interface IQueue extends cdk.IConstruct, s3n.IBucketNotificationDestinati * - sqs:GetQueueUrl * * @param grantee Principal to grant send rights to - * @param queueActions additional queue actions to allow */ grantPurge(grantee: iam.IGrantable): iam.Grant; @@ -257,7 +256,6 @@ export abstract class QueueBase extends cdk.Construct implements IQueue { * - sqs:GetQueueUrl * * @param grantee Principal to grant send rights to - * @param queueActions additional queue actions to allow */ public grantPurge(grantee: iam.IGrantable) { return this.grant(grantee, diff --git a/packages/@aws-cdk/cdk/lib/cfn-element.ts b/packages/@aws-cdk/cdk/lib/cfn-element.ts index 2d08e69a619ea..8d728fc07cdf8 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-element.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-element.ts @@ -37,7 +37,7 @@ export abstract class CfnElement extends Construct { * Creates an entity and binds it to a tree. * Note that the root of the tree must be a Stack object (not just any Root). * - * @param parent The parent construct + * @param scope The parent construct * @param props Construct properties */ constructor(scope: Construct, id: string) { @@ -153,4 +153,4 @@ export abstract class CfnRefElement extends CfnElement { } import { CfnReference } from "./cfn-reference"; -import { findTokens } from "./resolve"; \ No newline at end of file +import { findTokens } from "./resolve"; diff --git a/packages/@aws-cdk/cdk/lib/cfn-output.ts b/packages/@aws-cdk/cdk/lib/cfn-output.ts index 8118ef308ec81..813b0f78fce3a 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-output.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-output.ts @@ -72,7 +72,7 @@ export class CfnOutput extends CfnElement { /** * Creates an CfnOutput value for this stack. - * @param parent The parent construct. + * @param scope The parent construct. * @param props CfnOutput properties. */ constructor(scope: Construct, id: string, props: CfnOutputProps) { diff --git a/packages/@aws-cdk/cdk/lib/cfn-parameter.ts b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts index ad5f84d7a91c5..2550b9671a1d2 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-parameter.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts @@ -98,7 +98,7 @@ export class CfnParameter extends CfnRefElement { * Note that the name (logical ID) of the parameter will derive from it's `coname` and location * within the stack. Therefore, it is recommended that parameters are defined at the stack level. * - * @param parent The parent construct. + * @param scope The parent construct. * @param props The parameter properties. */ constructor(scope: Construct, id: string, props: CfnParameterProps) { diff --git a/packages/@aws-cdk/cdk/lib/cfn-rule.ts b/packages/@aws-cdk/cdk/lib/cfn-rule.ts index aeae6537e9183..a663b78dc1bb3 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-rule.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-rule.ts @@ -66,7 +66,7 @@ export class CfnRule extends CfnRefElement { /** * Creates and adds a rule. - * @param parent The parent construct. + * @param scope The parent construct. * @param props The rule props. */ constructor(scope: Construct, id: string, props?: CfnRuleProps) { diff --git a/packages/@aws-cdk/cdk/lib/construct.ts b/packages/@aws-cdk/cdk/lib/construct.ts index 080c97fd7b602..cba979ee5ab25 100644 --- a/packages/@aws-cdk/cdk/lib/construct.ts +++ b/packages/@aws-cdk/cdk/lib/construct.ts @@ -148,7 +148,7 @@ export class ConstructNode { * Note that if the original ID of the construct you are looking for contained * a '/', then it would have been replaced by '--'. * - * @param name Relative name of a direct or indirect child + * @param path Relative path of a direct or indirect child * @returns a child by path or undefined if not found. */ public tryFindChild(path: string): IConstruct | undefined { @@ -172,7 +172,7 @@ export class ConstructNode { * Note that if the original ID of the construct you are looking for contained * a '/', then it would have been replaced by '--'. * - * @param name Relative name of a direct or indirect child + * @param path Relative path of a direct or indirect child * @returns Child with the given path. */ public findChild(path: string): IConstruct { @@ -354,7 +354,7 @@ export class ConstructNode { /** * Return the ancestors (including self) of this Construct up until and excluding the indicated component * - * @param to The construct to return the path components relative to, or + * @param upTo The construct to return the path components relative to, or * the entire list of ancestors (including root) if omitted. */ public ancestors(upTo?: Construct): IConstruct[] { @@ -398,7 +398,7 @@ export class ConstructNode { * Adds a child construct to this node. * * @param child The child construct - * @param name The type name of the child construct. + * @param childName The type name of the child construct. * @returns The resolved path part name of the child */ public addChild(child: IConstruct, childName: string) { diff --git a/packages/@aws-cdk/cdk/lib/fn.ts b/packages/@aws-cdk/cdk/lib/fn.ts index 8d281673cbe47..807ec36b2b01d 100644 --- a/packages/@aws-cdk/cdk/lib/fn.ts +++ b/packages/@aws-cdk/cdk/lib/fn.ts @@ -173,7 +173,7 @@ export class Fn { * attribute, update policy attribute, and property values in the Resources * section and Outputs sections of a template. You can use the AWS::NoValue * pseudo parameter as a return value to remove the corresponding property. - * @param condition A reference to a condition in the Conditions section. Use + * @param conditionId A reference to a condition in the Conditions section. Use * the condition's name to reference it. * @param valueIfTrue A value to be returned if the specified condition * evaluates to true. diff --git a/packages/@aws-cdk/cdk/lib/include.ts b/packages/@aws-cdk/cdk/lib/include.ts index 50998841c415f..b63e7cff1493e 100644 --- a/packages/@aws-cdk/cdk/lib/include.ts +++ b/packages/@aws-cdk/cdk/lib/include.ts @@ -22,7 +22,7 @@ export class Include extends CfnElement { * Creates an adopted template construct. The template will be incorporated into the stack as-is with no changes at all. * This means that logical IDs of entities within this template may conflict with logical IDs of entities that are part of the * stack. - * @param parent The parent construct of this template + * @param scope The parent construct of this template * @param id The ID of this construct * @param template The template to adopt. */ diff --git a/packages/@aws-cdk/cdk/lib/stack.ts b/packages/@aws-cdk/cdk/lib/stack.ts index ed1023ffaee36..95b8458b5a44e 100644 --- a/packages/@aws-cdk/cdk/lib/stack.ts +++ b/packages/@aws-cdk/cdk/lib/stack.ts @@ -422,7 +422,8 @@ export class Stack extends Construct { * 'path/to/exampleobject.png' but simply 'path'. This is a limitation * because there is no slicing functionality in CloudFormation templates. * - * @param sep The separator used to separate resource from resourceName + * @param arn The ARN string to parse + * @param sepIfToken The separator used to separate resource from resourceName * @param hasName Whether there is a name component in the ARN at all. For * example, SNS Topics ARNs have the 'resource' component contain the topic * name, and no 'resourceName' component. diff --git a/packages/@aws-cdk/runtime-values/lib/rtv.ts b/packages/@aws-cdk/runtime-values/lib/rtv.ts index ac60a15dc3a81..89584c5c72271 100644 --- a/packages/@aws-cdk/runtime-values/lib/rtv.ts +++ b/packages/@aws-cdk/runtime-values/lib/rtv.ts @@ -72,7 +72,7 @@ export class RuntimeValue extends cdk.Construct { /** * Grants a principal read permissions on this runtime value. - * @param principal The principal (e.g. Role, User, Group) + * @param grantee The principal (e.g. Role, User, Group) */ public grantRead(grantee: iam.IGrantable) { return iam.Grant.addToPrincipal({ diff --git a/packages/@aws-cdk/runtime-values/package.json b/packages/@aws-cdk/runtime-values/package.json index 4c0e235b176be..0cc6acb97d846 100644 --- a/packages/@aws-cdk/runtime-values/package.json +++ b/packages/@aws-cdk/runtime-values/package.json @@ -70,7 +70,8 @@ "homepage": "https://github.com/awslabs/aws-cdk", "peerDependencies": { "@aws-cdk/aws-iam": "^0.28.0", - "@aws-cdk/cdk": "^0.28.0" + "@aws-cdk/cdk": "^0.28.0", + "@aws-cdk/aws-ssm": "^0.28.0" }, "engines": { "node": ">= 8.10.0" diff --git a/tools/awslint/lib/cfn-resources.ts b/tools/awslint/lib/cfn-resources.ts index b9e725e819572..5707058b0dcf2 100644 --- a/tools/awslint/lib/cfn-resources.ts +++ b/tools/awslint/lib/cfn-resources.ts @@ -36,14 +36,14 @@ export function findCfnResources(assembly: reflect.Assembly): CfnResourceSpec[] return assembly.classes.filter(c => isCfnResource(c)).map(layer1 => { const basename = layer1.name.substr('Cfn'.length); - const doc = layer1.docs.docs.link || ''; + const docLink = layer1.docs.docs.see || ''; // HACK: extract full CFN name from initializer docs - const initializerDoc = (layer1.initializer && layer1.initializer.docs.docs.comment) || ''; + const initializerDoc = (layer1.initializer && layer1.initializer.docs.docs.summary) || ''; const out = /a new `([^`]+)`/.exec(initializerDoc); const fullname = out && out[1]; if (!fullname) { - throw new Error('Unable to extract CloudFormation resource name from initializer documentation'); + throw new Error(`Unable to extract CloudFormation resource name from initializer documentation of ${layer1}`); } const namespace = fullname.split('::').slice(0, 2).join('::'); @@ -51,7 +51,7 @@ export function findCfnResources(assembly: reflect.Assembly): CfnResourceSpec[] const resource: CfnResourceSpec = { namespace, fullname, - doc, + doc: docLink, basename, attributes: parseResourceAttributes(layer1) }; @@ -60,7 +60,7 @@ export function findCfnResources(assembly: reflect.Assembly): CfnResourceSpec[] }); function parseResourceAttributes(cfnResourceClass: reflect.ClassType) { - return cfnResourceClass.properties.filter(p => p.docs.docs.cloudformation_attribute).map(p => p.name); + return cfnResourceClass.ownProperties.filter(p => (p.docs.docs.custom || {}).cloudformationAttribute).map(p => p.name); } function isCfnResource(c: reflect.ClassType) { diff --git a/tools/awslint/lib/rules/resource.ts b/tools/awslint/lib/rules/resource.ts index bc59f7efaad3c..0b8cea2ff738f 100644 --- a/tools/awslint/lib/rules/resource.ts +++ b/tools/awslint/lib/rules/resource.ts @@ -115,7 +115,7 @@ resourceLinter.add({ // verify that the interface has all attributes as readonly properties const resourceAttributes = new Array(); for (const attr of e.ctx.resource.attributes) { - const attribute: reflect.Property | undefined = e.ctx.resourceInterface.properties.find(p => p.name === attr); + const attribute: reflect.Property | undefined = e.ctx.resourceInterface.ownProperties.find(p => p.name === attr); const scope: string = e.ctx.resourceInterface.fqn + '.' + attr; if (e.assert(attribute, scope)) { resourceAttributes.push(attribute); @@ -145,7 +145,7 @@ resourceLinter.add({ if (!e.ctx.resourceInterface) { return; } if (!e.ctx.importPropsInterface) { return; } - const importMethod = e.ctx.resourceClass.methods.find(m => m.static && m.name === 'import'); + const importMethod = e.ctx.resourceClass.ownMethods.find(m => m.static && m.name === 'import'); if (!e.assert(importMethod, e.ctx.resourceClass.fqn)) { return; } @@ -167,7 +167,7 @@ resourceLinter.add({ eval: e => { if (!e.ctx.resourceInterface) { return; } - const exportMethod = e.ctx.resourceInterface.methods.find(m => m.name === 'export'); + const exportMethod = e.ctx.resourceInterface.ownMethods.find(m => m.name === 'export'); if (!e.assert(exportMethod, e.ctx.resourceInterface.fqn)) { return; } @@ -188,7 +188,7 @@ resourceLinter.add({ if (!e.ctx.resourceClass) { return; } const grantResultType = e.ctx.ts.findFqn(GRANT_RESULT_FQN); - const grantMethods = e.ctx.resourceClass.getMethods(true).filter(m => m.name.startsWith('grant')); + const grantMethods = e.ctx.resourceClass.allMethods.filter(m => m.name.startsWith('grant')); for (const grantMethod of grantMethods) { e.assertSignature(grantMethod, { diff --git a/tools/awslint/package-lock.json b/tools/awslint/package-lock.json index 8f012af8ca82a..fb3dbfc098d36 100644 --- a/tools/awslint/package-lock.json +++ b/tools/awslint/package-lock.json @@ -1,6 +1,6 @@ { "name": "awslint", - "version": "0.26.0", + "version": "0.28.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -411,21 +411,21 @@ } }, "jsii-reflect": { - "version": "0.7.15", - "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.7.15.tgz", - "integrity": "sha512-ZY/1utHln83ly1UscerO93O+O4b5ZFaMlZDO1S+4wvhYs2yLxjLMhgzToHXdLiy1ja9hXqFpSBVDpUKB2sC9rA==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-reflect/-/jsii-reflect-0.9.0.tgz", + "integrity": "sha512-3hnWsdNgpq01KygljlyK1TtDYLunF53HU2tC87SzygOqcwJUCeYiC1NSUxBQ4NMeL5msS7QGJavFsj2y0MOLYA==", "requires": { "colors": "^1.3.3", "fs-extra": "^7.0.1", - "jsii-spec": "^0.7.15", - "oo-ascii-tree": "^0.7.15", + "jsii-spec": "^0.9.0", + "oo-ascii-tree": "^0.9.0", "yargs": "^13.2.1" } }, "jsii-spec": { - "version": "0.7.15", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.7.15.tgz", - "integrity": "sha512-OytA5XH4EvhJXTEac9h8ugqEosg9GZcqsIYQEzIi6zD44gjjIIPSbfyL8X70Z1dR3hlVNz7NdbTrxI88+X+h/w==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.9.0.tgz", + "integrity": "sha512-/rBjM33smY1FS8W4Fwvref5EjodNsza/4zP0k6amUNRKmm+9veNbt6Vfw0FcstclNEguiPTvsiboA8E1htrvEw==", "requires": { "jsonschema": "^1.2.4" } @@ -534,9 +534,9 @@ } }, "oo-ascii-tree": { - "version": "0.7.15", - "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.7.15.tgz", - "integrity": "sha512-fMGG/Ns+kMO9def/XmzhH2M7X4Z0/BFJBTjo36puDjG6tieLIdgu+38yvTS3/PCV/JUr0v37ZrXOh/Hu/yX2Jg==" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oo-ascii-tree/-/oo-ascii-tree-0.9.0.tgz", + "integrity": "sha512-VhmcORilexTfudgwNO96IEQ0yF/eUdBZqBHbzS11iWm4lhCcX+U4hP/UT/4cT3mYkmTj6o8Iz230k73b70gJ3A==" }, "os-locale": { "version": "3.1.0", diff --git a/tools/awslint/package.json b/tools/awslint/package.json index 3fdbd6482e69a..1dee68e9b2708 100644 --- a/tools/awslint/package.json +++ b/tools/awslint/package.json @@ -16,7 +16,7 @@ "dependencies": { "colors": "^1.3.3", "fs-extra": "^7.0.1", - "jsii-reflect": "^0.7.15", + "jsii-reflect": "^0.9.0", "yargs": "^13.2.1" }, "devDependencies": { diff --git a/tools/cdk-build-tools/package-lock.json b/tools/cdk-build-tools/package-lock.json index e716f752a5427..ca5104e02026f 100644 --- a/tools/cdk-build-tools/package-lock.json +++ b/tools/cdk-build-tools/package-lock.json @@ -1,6 +1,6 @@ { "name": "cdk-build-tools", - "version": "0.27.0", + "version": "0.28.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -973,9 +973,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codemaker": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.8.2.tgz", - "integrity": "sha512-agUY157vcCXFnJ9gDM8/iKbq62PWHkccnztbeuS1NZ8Pm9Z13Z9FHMuXWrh/zOQjggXpr5y3pPBpCHOlDYnHLw==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/codemaker/-/codemaker-0.9.0.tgz", + "integrity": "sha512-ZFaGAyhg7+jss1vrnFaDRNLA2zDxEn9GVmMextVINg9fZZ+URnUNrnepHSOfNpAFlds/FqhcNsGytpCHfcYCDA==", "requires": { "camelcase": "^5.2.0", "decamelize": "^1.2.0", @@ -2642,15 +2642,15 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "jsii": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.8.2.tgz", - "integrity": "sha512-VbRwBFWlmWDoiNoNreX96ii37LEwviFvfSyTY37tMZFXs8QSG5NIrR66JmNaF/ejbQpubqAKxW/Nb/YWCqhRbg==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii/-/jsii-0.9.0.tgz", + "integrity": "sha512-7eVdKZ3Db5kgTRmNVmdljMx2ihVRFEaVrCKwsr3JwQ8eUlKg0p21P9cSeYb2wdX8NTMyW7+CI4IoiT9ksUtypA==", "requires": { "case": "^1.6.1", "colors": "^1.3.3", "deep-equal": "^1.0.1", "fs-extra": "^7.0.1", - "jsii-spec": "^0.8.2", + "jsii-spec": "^0.9.0", "log4js": "^4.0.2", "semver": "^5.6.0", "sort-json": "^2.0.0", @@ -2660,24 +2660,24 @@ } }, "jsii-pacmak": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.8.2.tgz", - "integrity": "sha512-guqjntPr9uVkGGR+4fAralIoHpPsdCLsQsDf7Kh3GCRjgLn20JeHBgv4vT6Wym0nqjqL/5fY4nsXI/9w/OVZ0A==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-pacmak/-/jsii-pacmak-0.9.0.tgz", + "integrity": "sha512-IKbTr2XFHXWlAH7dXzRdTwlZFtfQWUJtK3JFP6gRp6VKyD/G8lWogS4fTrUxStamndW6YZbe8w9vKkl0RB3T1Q==", "requires": { "clone": "^2.1.2", - "codemaker": "^0.8.2", + "codemaker": "^0.9.0", "escape-string-regexp": "^1.0.5", "fs-extra": "^7.0.1", - "jsii-spec": "^0.8.2", + "jsii-spec": "^0.9.0", "spdx-license-list": "^5.0.0", "xmlbuilder": "^11.0.0", "yargs": "^13.2.2" } }, "jsii-spec": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.8.2.tgz", - "integrity": "sha512-eDL96xDOMwk5tzSBqbOi1Hh17Y42eLyovoo4CEcwaHpBRR0mSccPyjXyjAEWJVMg1yyA2UEX0DrPgJa2yY7oeQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/jsii-spec/-/jsii-spec-0.9.0.tgz", + "integrity": "sha512-/rBjM33smY1FS8W4Fwvref5EjodNsza/4zP0k6amUNRKmm+9veNbt6Vfw0FcstclNEguiPTvsiboA8E1htrvEw==", "requires": { "jsonschema": "^1.2.4" } diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index ff178dabcffca..6d3e582f09486 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -37,8 +37,8 @@ "awslint": "^0.28.0", "fs-extra": "^7.0.1", "jest": "^24.4.0", - "jsii": "^0.8.2", - "jsii-pacmak": "^0.8.2", + "jsii": "^0.9.0", + "jsii-pacmak": "^0.9.0", "nodeunit": "^0.11.3", "nyc": "^13.3.0", "ts-jest": "^24.0.0",