From 5aa4fc7d47e8c1cc38ed27264d1367222a121125 Mon Sep 17 00:00:00 2001 From: Elad Ben-Israel Date: Tue, 19 Mar 2019 13:58:21 +0200 Subject: [PATCH] refactor: name "toCloudFormation" internal (renamed to "_toCloudFormation") (#2047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The method `toCloudFormation` is not supposed to be directly called by users. Mark it as `@internal` and rename to `_toCloudFormation`. Fixes #2044 Related #2016 BREAKING CHANGE: “toCloudFormation” is now internal and should not be called directly. Instead use “app.synthesizeStack” --- packages/@aws-cdk/assert/lib/expect.ts | 4 +- .../assets-docker/test/test.image-asset.ts | 2 +- packages/@aws-cdk/assets/test/test.asset.ts | 4 +- .../aws-apigateway/test/test.deployment.ts | 2 +- .../aws-apigateway/test/test.restapi.ts | 2 +- .../test/test.step-scaling-policy.ts | 2 +- .../aws-cloudtrail/test/test.cloudtrail.ts | 12 ++--- .../test/server/test.deployment-group.ts | 2 +- .../aws-codepipeline/test/test.pipeline.ts | 2 +- packages/@aws-cdk/aws-iam/test/test.role.ts | 4 +- packages/@aws-cdk/aws-s3/test/test.bucket.ts | 4 +- .../aws-s3/test/test.notifications.ts | 2 +- packages/@aws-cdk/aws-sqs/test/test.sqs.ts | 8 ++-- packages/@aws-cdk/cdk/lib/cfn-condition.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-element.ts | 8 ++-- packages/@aws-cdk/cdk/lib/cfn-mapping.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-output.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-parameter.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-resource.ts | 2 +- packages/@aws-cdk/cdk/lib/cfn-rule.ts | 2 +- packages/@aws-cdk/cdk/lib/include.ts | 2 +- packages/@aws-cdk/cdk/lib/stack.ts | 10 ++-- packages/@aws-cdk/cdk/test/test.arn.ts | 2 +- packages/@aws-cdk/cdk/test/test.condition.ts | 4 +- packages/@aws-cdk/cdk/test/test.include.ts | 6 +-- packages/@aws-cdk/cdk/test/test.logical-id.ts | 12 ++--- packages/@aws-cdk/cdk/test/test.mappings.ts | 2 +- packages/@aws-cdk/cdk/test/test.output.ts | 6 +-- packages/@aws-cdk/cdk/test/test.parameter.ts | 2 +- packages/@aws-cdk/cdk/test/test.resource.ts | 48 +++++++++---------- packages/@aws-cdk/cdk/test/test.rule.ts | 2 +- packages/@aws-cdk/cdk/test/test.secret.ts | 2 +- packages/@aws-cdk/cdk/test/test.stack.ts | 32 ++++++------- .../@aws-cdk/runtime-values/test/test.rtv.ts | 2 +- packages/aws-cdk/package-lock.json | 48 +++++++++---------- packages/decdk/package.json | 2 +- 36 files changed, 128 insertions(+), 124 deletions(-) diff --git a/packages/@aws-cdk/assert/lib/expect.ts b/packages/@aws-cdk/assert/lib/expect.ts index fa50a36088f47..f1c444a425caa 100644 --- a/packages/@aws-cdk/assert/lib/expect.ts +++ b/packages/@aws-cdk/assert/lib/expect.ts @@ -20,7 +20,7 @@ export function expect(stack: api.SynthesizedStack | cdk.Stack, skipValidation = sstack = { name: stack.name, - template: stack.toCloudFormation(), + template: stack._toCloudFormation(), metadata: collectStackMetadata(stack.node), environment: { name: 'test', @@ -36,7 +36,7 @@ export function expect(stack: api.SynthesizedStack | cdk.Stack, skipValidation = } function isStackClassInstance(x: api.SynthesizedStack | cdk.Stack): x is cdk.Stack { - return 'toCloudFormation' in x; + return '_toCloudFormation' in x; } function collectStackMetadata(root: cdk.ConstructNode): api.StackMetadata { diff --git a/packages/@aws-cdk/assets-docker/test/test.image-asset.ts b/packages/@aws-cdk/assets-docker/test/test.image-asset.ts index 24d249c1151c1..42aacd7a565fc 100644 --- a/packages/@aws-cdk/assets-docker/test/test.image-asset.ts +++ b/packages/@aws-cdk/assets-docker/test/test.image-asset.ts @@ -18,7 +18,7 @@ export = { }); // THEN - const template = stack.toCloudFormation(); + const template = stack._toCloudFormation(); test.deepEqual(template.Parameters.ImageImageName5E684353, { Type: 'String', diff --git a/packages/@aws-cdk/assets/test/test.asset.ts b/packages/@aws-cdk/assets/test/test.asset.ts index f27b07e38d26c..1c28ec9ef4d04 100644 --- a/packages/@aws-cdk/assets/test/test.asset.ts +++ b/packages/@aws-cdk/assets/test/test.asset.ts @@ -30,7 +30,7 @@ export = { }); // verify that now the template contains parameters for this asset - const template = stack.toCloudFormation(); + const template = stack._toCloudFormation(); test.equal(template.Parameters.MyAssetS3Bucket68C9B344.Type, 'String'); test.equal(template.Parameters.MyAssetS3VersionKey68E1A45D.Type, 'String'); @@ -74,7 +74,7 @@ export = { }); // verify that now the template contains parameters for this asset - const template = stack.toCloudFormation(); + const template = stack._toCloudFormation(); test.equal(template.Parameters.MyAssetS3Bucket68C9B344.Type, 'String'); test.equal(template.Parameters.MyAssetS3VersionKey68E1A45D.Type, 'String'); diff --git a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts b/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts index 2017eb2e70a38..ac8db66cd4d25 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts +++ b/packages/@aws-cdk/aws-apigateway/test/test.deployment.ts @@ -153,7 +153,7 @@ export = { function synthesize() { stack.node.prepareTree(); - return stack.toCloudFormation(); + return stack._toCloudFormation(); } }, diff --git a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts b/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts index d3fe96d286b97..740481dc534f8 100644 --- a/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts +++ b/packages/@aws-cdk/aws-apigateway/test/test.restapi.ts @@ -344,7 +344,7 @@ export = { // THEN stack.node.prepareTree(); - test.deepEqual(stack.toCloudFormation().Outputs.MyRestApiRestApiIdB93C5C2D, { + test.deepEqual(stack._toCloudFormation().Outputs.MyRestApiRestApiIdB93C5C2D, { Value: { Ref: 'MyRestApi2D1F47A9' }, Export: { Name: 'MyRestApiRestApiIdB93C5C2D' } }); diff --git a/packages/@aws-cdk/aws-applicationautoscaling/test/test.step-scaling-policy.ts b/packages/@aws-cdk/aws-applicationautoscaling/test/test.step-scaling-policy.ts index a3a8d48f4bae7..71772bcf7e639 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/test/test.step-scaling-policy.ts +++ b/packages/@aws-cdk/aws-applicationautoscaling/test/test.step-scaling-policy.ts @@ -129,7 +129,7 @@ function setupStepScaling(intervals: appscaling.ScalingInterval[]) { scalingSteps: intervals }); - return new ScalingStackTemplate(stack.toCloudFormation()); + return new ScalingStackTemplate(stack._toCloudFormation()); } class ScalingStackTemplate { diff --git a/packages/@aws-cdk/aws-cloudtrail/test/test.cloudtrail.ts b/packages/@aws-cdk/aws-cloudtrail/test/test.cloudtrail.ts index 1cf7d571ae139..1197811a5f2bf 100644 --- a/packages/@aws-cdk/aws-cloudtrail/test/test.cloudtrail.ts +++ b/packages/@aws-cdk/aws-cloudtrail/test/test.cloudtrail.ts @@ -66,7 +66,7 @@ export = { expect(stack).to(haveResource("AWS::S3::Bucket")); expect(stack).to(haveResource("AWS::S3::BucketPolicy", ExpectedBucketPolicyProperties)); expect(stack).to(not(haveResource("AWS::Logs::LogGroup"))); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.deepEqual(trail.DependsOn, ['MyAmazingCloudTrailS3Policy39C120B0']); test.done(); }, @@ -97,7 +97,7 @@ export = { PolicyName: logsRolePolicyName, Roles: [{ Ref: 'MyAmazingCloudTrailLogsRoleF2CCF977' }], })); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.deepEqual(trail.DependsOn, [logsRolePolicyName, logsRoleName, 'MyAmazingCloudTrailS3Policy39C120B0']); test.done(); }, @@ -116,7 +116,7 @@ export = { expect(stack).to(haveResource("AWS::Logs::LogGroup", { RetentionInDays: 7 })); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.deepEqual(trail.DependsOn, [logsRolePolicyName, logsRoleName, 'MyAmazingCloudTrailS3Policy39C120B0']); test.done(); }, @@ -134,7 +134,7 @@ export = { expect(stack).to(not(haveResource("AWS::Logs::LogGroup"))); expect(stack).to(not(haveResource("AWS::IAM::Role"))); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.equals(trail.Properties.EventSelectors.length, 1); const selector = trail.Properties.EventSelectors[0]; test.equals(selector.ReadWriteType, null, "Expected selector read write type to be undefined"); @@ -160,7 +160,7 @@ export = { expect(stack).to(not(haveResource("AWS::Logs::LogGroup"))); expect(stack).to(not(haveResource("AWS::IAM::Role"))); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.equals(trail.Properties.EventSelectors.length, 1); const selector = trail.Properties.EventSelectors[0]; test.equals(selector.ReadWriteType, "ReadOnly", "Expected selector read write type to be Read"); @@ -179,7 +179,7 @@ export = { new CloudTrail(stack, 'MyAmazingCloudTrail', { managementEvents: ReadWriteType.WriteOnly }); - const trail: any = stack.toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; + const trail: any = stack._toCloudFormation().Resources.MyAmazingCloudTrail54516E8D; test.equals(trail.Properties.EventSelectors.length, 1); const selector = trail.Properties.EventSelectors[0]; test.equals(selector.ReadWriteType, "WriteOnly", "Expected selector read write type to be All"); diff --git a/packages/@aws-cdk/aws-codedeploy/test/server/test.deployment-group.ts b/packages/@aws-cdk/aws-codedeploy/test/server/test.deployment-group.ts index a9631773b57b8..ac79e4efc9f6d 100644 --- a/packages/@aws-cdk/aws-codedeploy/test/server/test.deployment-group.ts +++ b/packages/@aws-cdk/aws-codedeploy/test/server/test.deployment-group.ts @@ -355,7 +355,7 @@ export = { }); test.throws(() => { - stack.toCloudFormation(); + stack._toCloudFormation(); }, /deploymentInAlarm/); test.done(); diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts b/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts index 5dec7efcdddd7..e2a69af8e5f06 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts @@ -45,7 +45,7 @@ export = { ], }); - test.notDeepEqual(stack.toCloudFormation(), {}); + test.notDeepEqual(stack._toCloudFormation(), {}); test.deepEqual([], pipeline.node.validateTree()); test.done(); }, diff --git a/packages/@aws-cdk/aws-iam/test/test.role.ts b/packages/@aws-cdk/aws-iam/test/test.role.ts index 2b8520adc6c52..155d1b1154b79 100644 --- a/packages/@aws-cdk/aws-iam/test/test.role.ts +++ b/packages/@aws-cdk/aws-iam/test/test.role.ts @@ -87,10 +87,10 @@ export = { assumedBy: new ServicePrincipal('sns.amazonaws.com') }); - test.ok(!('MyRoleDefaultPolicyA36BE1DD' in stack.toCloudFormation().Resources), 'initially created without a policy'); + test.ok(!('MyRoleDefaultPolicyA36BE1DD' in stack._toCloudFormation().Resources), 'initially created without a policy'); role.addToPolicy(new PolicyStatement().addResource('myresource').addAction('myaction')); - test.ok(stack.toCloudFormation().Resources.MyRoleDefaultPolicyA36BE1DD, 'policy resource created'); + test.ok(stack._toCloudFormation().Resources.MyRoleDefaultPolicyA36BE1DD, 'policy resource created'); expect(stack).toMatch({ Resources: { MyRoleF48FFE04: diff --git a/packages/@aws-cdk/aws-s3/test/test.bucket.ts b/packages/@aws-cdk/aws-s3/test/test.bucket.ts index df9eb379964cf..cf7ef92a7c8b1 100644 --- a/packages/@aws-cdk/aws-s3/test/test.bucket.ts +++ b/packages/@aws-cdk/aws-s3/test/test.bucket.ts @@ -444,7 +444,7 @@ export = { test.deepEqual(bucket.bucketArn, bucketArn); test.deepEqual(bucket.node.resolve(bucket.bucketName), 'my-bucket'); - test.deepEqual(stack.toCloudFormation(), {}, 'the ref is not a real resource'); + test.deepEqual(stack._toCloudFormation(), {}, 'the ref is not a real resource'); test.done(); }, @@ -925,7 +925,7 @@ export = { bucket.grantWrite(writer); bucket.grantDelete(deleter); - const resources = stack.toCloudFormation().Resources; + const resources = stack._toCloudFormation().Resources; const actions = (id: string) => resources[id].Properties.PolicyDocument.Statement[0].Action; test.deepEqual(actions('WriterDefaultPolicyDC585BCE'), [ 's3:DeleteObject*', 's3:PutObject*', 's3:Abort*' ]); diff --git a/packages/@aws-cdk/aws-s3/test/test.notifications.ts b/packages/@aws-cdk/aws-s3/test/test.notifications.ts index a82c1359fe0d5..8009213fbf00e 100644 --- a/packages/@aws-cdk/aws-s3/test/test.notifications.ts +++ b/packages/@aws-cdk/aws-s3/test/test.notifications.ts @@ -307,7 +307,7 @@ export = { bucket.onObjectCreated(dest); stack.node.prepareTree(); - test.deepEqual(stack.toCloudFormation().Resources.BucketNotifications8F2E257D, { + test.deepEqual(stack._toCloudFormation().Resources.BucketNotifications8F2E257D, { Type: 'Custom::S3BucketNotifications', Properties: { ServiceToken: { 'Fn::GetAtt': [ 'BucketNotificationsHandler050a0587b7544547bf325f094a3db8347ECC3691', 'Arn' ] }, diff --git a/packages/@aws-cdk/aws-sqs/test/test.sqs.ts b/packages/@aws-cdk/aws-sqs/test/test.sqs.ts index 048d0c92177b1..44d327797da37 100644 --- a/packages/@aws-cdk/aws-sqs/test/test.sqs.ts +++ b/packages/@aws-cdk/aws-sqs/test/test.sqs.ts @@ -107,7 +107,7 @@ export = { test.deepEqual(stack.node.resolve(imports.queueUrl), { 'Fn::ImportValue': 'QueueQueueUrlC30FF916' }); // the exporting stack has Outputs for QueueARN and QueueURL - const outputs = stack.toCloudFormation().Outputs; + const outputs = stack._toCloudFormation().Outputs; test.deepEqual(outputs.QueueQueueArn8CF496D5, { Value: { 'Fn::GetAtt': [ 'Queue4A7E3555', 'Arn' ] }, Export: { Name: 'QueueQueueArn8CF496D5' } }); test.deepEqual(outputs.QueueQueueUrlC30FF916, { Value: { Ref: 'Queue4A7E3555' }, Export: { Name: 'QueueQueueUrlC30FF916' } }); @@ -252,7 +252,7 @@ export = { keyArn: { 'Fn::ImportValue': 'QueueWithCustomKeyKeyArn537F6E42' } }); - test.deepEqual(stack.toCloudFormation().Outputs, { + test.deepEqual(stack._toCloudFormation().Outputs, { "QueueWithCustomKeyQueueArnD326BB9B": { "Value": { "Fn::GetAtt": [ @@ -300,7 +300,7 @@ export = { keyArn: { 'Fn::ImportValue': 'QueueWithManagedKeyKeyArn9C42A85D' } }); - test.deepEqual(stack.toCloudFormation().Outputs, { + test.deepEqual(stack._toCloudFormation().Outputs, { "QueueWithManagedKeyQueueArn8798A14E": { "Value": { "Fn::GetAtt": [ @@ -406,7 +406,7 @@ export = { // make sure the queue policy is added as a dependency to the bucket // notifications resource so it will be created first. - test.deepEqual(stack.toCloudFormation().Resources.BucketNotifications8F2E257D.DependsOn, [ 'QueuePolicy25439813' ]); + test.deepEqual(stack._toCloudFormation().Resources.BucketNotifications8F2E257D.DependsOn, [ 'QueuePolicy25439813' ]); test.done(); }, diff --git a/packages/@aws-cdk/cdk/lib/cfn-condition.ts b/packages/@aws-cdk/cdk/lib/cfn-condition.ts index 4cd6549f7295c..1f28cc15047df 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-condition.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-condition.ts @@ -25,7 +25,7 @@ export class CfnCondition extends CfnRefElement implements ICfnConditionExpressi this.expression = props && props.expression; } - public toCloudFormation(): object { + public _toCloudFormation(): object { if (!this.expression) { return { }; } diff --git a/packages/@aws-cdk/cdk/lib/cfn-element.ts b/packages/@aws-cdk/cdk/lib/cfn-element.ts index 89aba929fbe2a..ffd546b0f98cb 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-element.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-element.ts @@ -17,7 +17,7 @@ export abstract class CfnElement extends Construct { * @returns The construct as a stack element or undefined if it is not a stack element. */ public static isCfnElement(construct: IConstruct): construct is CfnElement { - return ('logicalId' in construct && 'toCloudFormation' in construct); + return ('logicalId' in construct && '_toCloudFormation' in construct); } /** @@ -100,8 +100,10 @@ export abstract class CfnElement extends Construct { * } * } * } + * + * @internal */ - public abstract toCloudFormation(): object; + public abstract _toCloudFormation(): object; /** * Automatically detect references in this CfnElement @@ -117,7 +119,7 @@ export abstract class CfnElement extends Construct { // This does make the assumption that the error will not be rectified, // but the error will be thrown later on anyway. If the error doesn't // get thrown down the line, we may miss references. - this.node.recordReference(...findTokens(this, () => this.toCloudFormation())); + this.node.recordReference(...findTokens(this, () => this._toCloudFormation())); } catch (e) { if (e.type !== 'CfnSynthesisError') { throw e; } } diff --git a/packages/@aws-cdk/cdk/lib/cfn-mapping.ts b/packages/@aws-cdk/cdk/lib/cfn-mapping.ts index 3897f255582d3..2444dff11ba5d 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-mapping.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-mapping.ts @@ -43,7 +43,7 @@ export class CfnMapping extends CfnRefElement { return Fn.findInMap(this.logicalId, key1, key2); } - public toCloudFormation(): object { + public _toCloudFormation(): object { return { Mappings: { [this.logicalId]: this.mapping diff --git a/packages/@aws-cdk/cdk/lib/cfn-output.ts b/packages/@aws-cdk/cdk/lib/cfn-output.ts index 4432ca7874b92..519c03980b297 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-output.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-output.ts @@ -111,7 +111,7 @@ export class CfnOutput extends CfnElement { return fn().importValue(this.obtainExportName()); } - public toCloudFormation(): object { + public _toCloudFormation(): object { return { Outputs: { [this.logicalId]: { diff --git a/packages/@aws-cdk/cdk/lib/cfn-parameter.ts b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts index f04bca2300039..c5006a6a8d35f 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-parameter.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-parameter.ts @@ -104,7 +104,7 @@ export class CfnParameter extends CfnRefElement { this.stringListValue = this.value.toList(); } - public toCloudFormation(): object { + public _toCloudFormation(): object { return { Parameters: { [this.logicalId]: { diff --git a/packages/@aws-cdk/cdk/lib/cfn-resource.ts b/packages/@aws-cdk/cdk/lib/cfn-resource.ts index 68777d8de806d..74bc60dce7159 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-resource.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-resource.ts @@ -206,7 +206,7 @@ export class CfnResource extends CfnRefElement { /** * Emits CloudFormation for this resource. */ - public toCloudFormation(): object { + public _toCloudFormation(): object { try { // merge property overrides onto properties and then render (and validate). const tags = CfnResource.isTaggable(this) ? this.tags.renderTags() : undefined; diff --git a/packages/@aws-cdk/cdk/lib/cfn-rule.ts b/packages/@aws-cdk/cdk/lib/cfn-rule.ts index c51a40f6617fa..207e43a5b5a1f 100644 --- a/packages/@aws-cdk/cdk/lib/cfn-rule.ts +++ b/packages/@aws-cdk/cdk/lib/cfn-rule.ts @@ -92,7 +92,7 @@ export class CfnRule extends CfnRefElement { }); } - public toCloudFormation(): object { + public _toCloudFormation(): object { return { Rules: { [this.logicalId]: { diff --git a/packages/@aws-cdk/cdk/lib/include.ts b/packages/@aws-cdk/cdk/lib/include.ts index 1ae1fbe030c0f..a6d9831568be6 100644 --- a/packages/@aws-cdk/cdk/lib/include.ts +++ b/packages/@aws-cdk/cdk/lib/include.ts @@ -31,7 +31,7 @@ export class Include extends CfnElement { this.template = props.template; } - public toCloudFormation() { + public _toCloudFormation() { return this.template; } } diff --git a/packages/@aws-cdk/cdk/lib/stack.ts b/packages/@aws-cdk/cdk/lib/stack.ts index 25452e6e1d991..0b9d4e1509c62 100644 --- a/packages/@aws-cdk/cdk/lib/stack.ts +++ b/packages/@aws-cdk/cdk/lib/stack.ts @@ -143,9 +143,11 @@ export class Stack extends Construct { /** * Returns the CloudFormation template for this stack by traversing - * the tree and invoking toCloudFormation() on all Entity objects. + * the tree and invoking _toCloudFormation() on all Entity objects. + * + * @internal */ - public toCloudFormation() { + public _toCloudFormation() { // before we begin synthesis, we shall lock this stack, so children cannot be added this.node.lock(); @@ -158,7 +160,7 @@ export class Stack extends Construct { }; const elements = cfnElements(this); - const fragments = elements.map(e => this.node.resolve(e.toCloudFormation())); + const fragments = elements.map(e => this.node.resolve(e._toCloudFormation())); // merge in all CloudFormation fragments collected from the tree for (const fragment of fragments) { @@ -446,7 +448,7 @@ export class Stack extends Construct { const template = `${this.node.id}.template.json`; // write the CloudFormation template as a JSON file - session.store.writeJson(template, this.toCloudFormation()); + session.store.writeJson(template, this._toCloudFormation()); const artifact: cxapi.Artifact = { type: cxapi.ArtifactType.AwsCloudFormationStack, diff --git a/packages/@aws-cdk/cdk/test/test.arn.ts b/packages/@aws-cdk/cdk/test/test.arn.ts index 8d4d02ef12c22..ef1041a2b0997 100644 --- a/packages/@aws-cdk/cdk/test/test.arn.ts +++ b/packages/@aws-cdk/cdk/test/test.arn.ts @@ -219,7 +219,7 @@ export = { new CfnOutput(stack2, 'SomeValue', { value: arn }); // THEN - test.deepEqual(stack2.node.resolve(stack2.toCloudFormation()), { + test.deepEqual(stack2.node.resolve(stack2._toCloudFormation()), { Outputs: { SomeValue: { Value: { diff --git a/packages/@aws-cdk/cdk/test/test.condition.ts b/packages/@aws-cdk/cdk/test/test.condition.ts index 546d2d80d93a0..86a6517d8e73b 100644 --- a/packages/@aws-cdk/cdk/test/test.condition.ts +++ b/packages/@aws-cdk/cdk/test/test.condition.ts @@ -16,7 +16,7 @@ export = { }); // THEN - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Parameters: { Param1: { Type: 'String' } }, Conditions: { Condition1: { 'Fn::Equals': [ 'a', 'b' ] }, @@ -45,7 +45,7 @@ export = { // THEN test.ok(cdk.unresolved(propValue)); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Foo::Bar', diff --git a/packages/@aws-cdk/cdk/test/test.include.ts b/packages/@aws-cdk/cdk/test/test.include.ts index 6e80bc19abb97..d8761503c4f22 100644 --- a/packages/@aws-cdk/cdk/test/test.include.ts +++ b/packages/@aws-cdk/cdk/test/test.include.ts @@ -7,7 +7,7 @@ export = { new Include(stack, 'T1', { template: clone(template) }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Parameters: { MyParam: { Type: 'String', Default: 'Hello' } }, Resources: { MyResource1: { Type: 'ResourceType1', Properties: { P1: 1, P2: 2 } }, @@ -24,7 +24,7 @@ export = { new CfnOutput(stack, 'MyOutput', { description: 'Out!', disableExport: true }); new CfnParameter(stack, 'MyParam2', { type: 'Integer' }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Parameters: { MyParam: { Type: 'String', Default: 'Hello' }, MyParam2: { Type: 'Integer' } }, @@ -46,7 +46,7 @@ export = { new CfnOutput(stack, 'MyOutput', { description: 'Out!' }); new CfnParameter(stack, 'MyParam', { type: 'Integer' }); // duplicate! - test.throws(() => stack.toCloudFormation()); + test.throws(() => stack._toCloudFormation()); test.done(); }, }; diff --git a/packages/@aws-cdk/cdk/test/test.logical-id.ts b/packages/@aws-cdk/cdk/test/test.logical-id.ts index c237670430dba..a2037722587e3 100644 --- a/packages/@aws-cdk/cdk/test/test.logical-id.ts +++ b/packages/@aws-cdk/cdk/test/test.logical-id.ts @@ -44,7 +44,7 @@ const uniqueTests = { new CfnResource(parent, 'ThingResource', { type: 'AWS::TAAS::Thing' }); // THEN - const template = stack.toCloudFormation(); + const template = stack._toCloudFormation(); test.ok('Renamed' in template.Resources); test.done(); @@ -60,7 +60,7 @@ const uniqueTests = { // THEN test.throws(() => { - stack.toCloudFormation(); + stack._toCloudFormation(); }); test.done(); @@ -95,7 +95,7 @@ const uniqueTests = { new CfnResource(child2, 'HeyThere', { type: 'AWS::TAAS::Thing' }); // THEN - const template = stack.toCloudFormation(); + const template = stack._toCloudFormation(); test.deepEqual(template, { Resources: { ParentChildHeyThere35220347: { @@ -112,7 +112,7 @@ const uniqueTests = { const stack1 = new Stack(); const parent1 = new Construct(stack1, 'Parent'); new CfnResource(parent1, 'HeyThere', { type: 'AWS::TAAS::Thing' }); - const template1 = stack1.toCloudFormation(); + const template1 = stack1._toCloudFormation(); // AND const theId1 = Object.keys(template1.Resources)[0]; @@ -123,7 +123,7 @@ const uniqueTests = { const parent2 = new Construct(stack2, 'Parent'); const invisibleWrapper = new Construct(parent2, 'Default'); new CfnResource(invisibleWrapper, 'HeyThere', { type: 'AWS::TAAS::Thing' }); - const template2 = stack1.toCloudFormation(); + const template2 = stack1._toCloudFormation(); const theId2 = Object.keys(template2.Resources)[0]; test.equal('AWS::TAAS::Thing', template2.Resources[theId2].Type); @@ -211,7 +211,7 @@ const allSchemesTests: {[name: string]: (scheme: IAddressingScheme, test: Test) // THEN stack.node.prepareTree(); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { NewName: { Type: 'R1' }, diff --git a/packages/@aws-cdk/cdk/test/test.mappings.ts b/packages/@aws-cdk/cdk/test/test.mappings.ts index 9c619b03240d2..82cae2a2ab406 100644 --- a/packages/@aws-cdk/cdk/test/test.mappings.ts +++ b/packages/@aws-cdk/cdk/test/test.mappings.ts @@ -28,7 +28,7 @@ export = { mapping.setValue('TopLevelKey2', 'SecondLevelKey2', 'Hi'); mapping.setValue('TopLevelKey1', 'SecondLevelKey1', [ 1, 2, 3, 4 ]); - test.deepEqual(stack.toCloudFormation(), { Mappings: + test.deepEqual(stack._toCloudFormation(), { Mappings: { MyMapping: { TopLevelKey1: { SecondLevelKey1: [ 1, 2, 3, 4 ], diff --git a/packages/@aws-cdk/cdk/test/test.output.ts b/packages/@aws-cdk/cdk/test/test.output.ts index b0b0549777e65..278f544a30865 100644 --- a/packages/@aws-cdk/cdk/test/test.output.ts +++ b/packages/@aws-cdk/cdk/test/test.output.ts @@ -12,7 +12,7 @@ export = { value: ref, description: 'CfnOutput properties' }); - test.deepEqual(stack.toCloudFormation(), { Resources: { MyResource: { Type: 'R' } }, + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'R' } }, Outputs: { MyOutput: { Description: 'CfnOutput properties', @@ -55,7 +55,7 @@ export = { const output = new CfnOutput(stack, 'MyOutput'); test.deepEqual(stack.node.resolve(output.makeImportValue()), { 'Fn::ImportValue': 'MyStack:MyOutput' }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Outputs: { MyOutput: { Export: { Name: 'MyStack:MyOutput' } @@ -73,7 +73,7 @@ export = { new CfnOutput(stack, 'SomeOutput', { value: 'x' }); // THEN - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Outputs: { SomeOutput: { Value: 'x' diff --git a/packages/@aws-cdk/cdk/test/test.parameter.ts b/packages/@aws-cdk/cdk/test/test.parameter.ts index a9773291f2862..c8e783a59e8dd 100644 --- a/packages/@aws-cdk/cdk/test/test.parameter.ts +++ b/packages/@aws-cdk/cdk/test/test.parameter.ts @@ -14,7 +14,7 @@ export = { new CfnResource(stack, 'Resource', { type: 'Type', properties: { ReferenceToParam: param.ref } }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Parameters: { ChildMyParam3161BF5D: { Default: 10, diff --git a/packages/@aws-cdk/cdk/test/test.resource.ts b/packages/@aws-cdk/cdk/test/test.resource.ts index 5ee4f6f92872f..0e78f0296d97c 100644 --- a/packages/@aws-cdk/cdk/test/test.resource.ts +++ b/packages/@aws-cdk/cdk/test/test.resource.ts @@ -15,7 +15,7 @@ export = { } }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: "MyResourceType", @@ -56,7 +56,7 @@ export = { res.increment(); res.increment(2); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'My::Counter', Properties: { Count: 13 } } } @@ -78,7 +78,7 @@ export = { } }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'My::Counter', Properties: { Count: 10 } }, YourResource: { @@ -105,7 +105,7 @@ export = { } }); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: "My::Counter", Properties: { Count: 1 } }, MyResource2: { @@ -131,7 +131,7 @@ export = { r2.node.addDependency(r3); stack.node.prepareTree(); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Counter1: { Type: "My::Counter", @@ -166,7 +166,7 @@ export = { dependent.addDependsOn(r1); // THEN - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Counter1: { Type: "My::Counter", @@ -191,7 +191,7 @@ export = { const cond = new CfnCondition(stack, 'MyCondition', { expression: Fn.conditionNot(Fn.conditionEquals('a', 'b')) }); r1.options.condition = cond; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Resource: { Type: 'Type', Condition: 'MyCondition' } }, Conditions: { MyCondition: { 'Fn::Not': [ { 'Fn::Equals': [ 'a', 'b' ] } ] } } }); @@ -217,7 +217,7 @@ export = { r1.options.deletionPolicy = DeletionPolicy.Retain; r1.options.updateReplacePolicy = DeletionPolicy.Snapshot; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Resource: { Type: 'Type', @@ -246,7 +246,7 @@ export = { r1.options.updatePolicy = { useOnlineResharding: true }; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Resource: { Type: 'Type', @@ -269,7 +269,7 @@ export = { MyValue: 99 }; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Resources: { Resource: { Type: "Type", @@ -301,7 +301,7 @@ export = { applyRemovalPolicy(forbid, RemovalPolicy.Forbid); applyRemovalPolicy(destroy, RemovalPolicy.Destroy); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { Orphan: { Type: 'T1', DeletionPolicy: 'Retain' }, Forbid: { Type: 'T2', DeletionPolicy: 'Retain' }, Destroy: { Type: 'T3' } } }); @@ -352,7 +352,7 @@ export = { dependingResource.node.addDependency(c3); stack.node.prepareTree(); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyC1R1FB2A562F: { Type: 'T1' }, MyC1R2AE2B5066: { Type: 'T2' }, MyC2R3809EEAD6: { Type: 'T3' }, @@ -387,7 +387,7 @@ export = { r.addOverride('Use.Dot.Notation', 'To create subtrees'); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'YouCanEvenOverrideTheType', Use: { Dot: { Notation: 'To create subtrees' } }, @@ -416,7 +416,7 @@ export = { r.addOverride('Properties.Hello.World.Value2', null); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: { Hello: { World: { Value1: 'Hello', Value2: null } } } } } }); @@ -444,7 +444,7 @@ export = { r.addOverride('Properties.Hello.World.Value2', undefined); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: { Hello: { World: { Value1: 'Hello' } } } } } }); @@ -463,7 +463,7 @@ export = { r.addPropertyOverride('Tree.Does.Not.Exist', undefined); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: { Tree: { Exists: 42 } } } } }); @@ -493,7 +493,7 @@ export = { r.addPropertyDeletionOverride('Hello.World.Value3'); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: { Hello: { World: { Value1: 'Hello' } } } } } }); @@ -519,7 +519,7 @@ export = { r.addOverride('Properties.Hello.World.Foo.Bar', 42); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: @@ -542,7 +542,7 @@ export = { r.addPropertyOverride('Hello.World', { Hey: 'Jude' }); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'AWS::Resource::Type', Properties: { Hello: { World: { Hey: 'Jude' } } } } } }); @@ -560,7 +560,7 @@ export = { r.setProperty('prop2', 'bar'); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'MyResourceType', Properties: { PROP1: 'foo', PROP2: 'bar' } } } }); @@ -574,7 +574,7 @@ export = { r.setProperty('prop3', 'zoo'); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'MyResourceType', Properties: { PROP3: 'zoo' } } } }); @@ -589,7 +589,7 @@ export = { r.setProperty('prop3', 'zoo'); r.setProperty('prop2', 'hey'); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'MyResourceType', Properties: { PROP2: 'hey', PROP3: 'zoo' } } } }); @@ -608,7 +608,7 @@ export = { type: 'MyResourceType', }); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { ParentMyResource4B1FDBCC: { Type: 'MyResourceType', Metadata: { [cxapi.PATH_METADATA_KEY]: 'Parent/MyResource' } } } }); @@ -629,7 +629,7 @@ export = { // THEN app.node.prepareTree(); - test.deepEqual(stackB.toCloudFormation(), { + test.deepEqual(stackB._toCloudFormation(), { Resources: { Resource: { Type: 'R' diff --git a/packages/@aws-cdk/cdk/test/test.rule.ts b/packages/@aws-cdk/cdk/test/test.rule.ts index 93fd6dc0b06ac..f400cad1b9bd0 100644 --- a/packages/@aws-cdk/cdk/test/test.rule.ts +++ b/packages/@aws-cdk/cdk/test/test.rule.ts @@ -9,7 +9,7 @@ export = { rule.addAssertion(Fn.conditionEquals('lhs', 'rhs'), 'lhs equals rhs'); rule.addAssertion(Fn.conditionNot(Fn.conditionAnd(Fn.conditionContains([ 'hello', 'world' ], "world"))), 'some assertion'); - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Rules: { MyRule: { Assertions: [ diff --git a/packages/@aws-cdk/cdk/test/test.secret.ts b/packages/@aws-cdk/cdk/test/test.secret.ts index 6a4eb23ae3fff..f240df0413c60 100644 --- a/packages/@aws-cdk/cdk/test/test.secret.ts +++ b/packages/@aws-cdk/cdk/test/test.secret.ts @@ -27,7 +27,7 @@ export = { allowedValues: [ 'allowed', 'values' ], }); - test.deepEqual(stack.toCloudFormation(), { Parameters: + test.deepEqual(stack._toCloudFormation(), { Parameters: { MySecretParameterBB81DE58: { Type: 'AWS::SSM::Parameter::Value', Default: '/my/secret/param', diff --git a/packages/@aws-cdk/cdk/test/test.stack.ts b/packages/@aws-cdk/cdk/test/test.stack.ts index ee507750abb7c..74683f1f87ba3 100644 --- a/packages/@aws-cdk/cdk/test/test.stack.ts +++ b/packages/@aws-cdk/cdk/test/test.stack.ts @@ -5,7 +5,7 @@ import { App, CfnCondition, CfnOutput, CfnParameter, CfnResource, Construct, Inc export = { 'a stack can be serialized into a CloudFormation template, initially it\'s empty'(test: Test) { const stack = new Stack(); - test.deepEqual(stack.toCloudFormation(), { }); + test.deepEqual(stack._toCloudFormation(), { }); test.done(); }, @@ -14,7 +14,7 @@ export = { stack.templateOptions.templateFormatVersion = 'MyTemplateVersion'; stack.templateOptions.description = 'This is my description'; stack.templateOptions.transform = 'SAMy'; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Description: 'This is my description', AWSTemplateFormatVersion: 'MyTemplateVersion', Transform: 'SAMy' @@ -34,7 +34,7 @@ export = { const stack = new Stack(undefined, 'MyStack'); new CfnResource(stack, 'MyResource', { type: 'MyResourceType' }); - test.deepEqual(stack.toCloudFormation(), { Resources: { MyResource: { Type: 'MyResourceType' } } }); + test.deepEqual(stack._toCloudFormation(), { Resources: { MyResource: { Type: 'MyResourceType' } } }); test.done(); }, @@ -48,7 +48,7 @@ export = { MetadataKey: 'MetadataValue' }; - test.deepEqual(stack.toCloudFormation(), { + test.deepEqual(stack._toCloudFormation(), { Description: 'StackDescription', Transform: 'Transform', AWSTemplateFormatVersion: 'TemplateVersion', @@ -62,7 +62,7 @@ export = { // workaround for people running into issues caused by SDK-3003. // We should come up with a proper solution that involved jsii callbacks (when they exist) // so this can be implemented by jsii languages as well. - 'Overriding `Stack.toCloudFormation` allows arbitrary post-processing of the generated template during synthesis'(test: Test) { + 'Overriding `Stack._toCloudFormation` allows arbitrary post-processing of the generated template during synthesis'(test: Test) { const stack = new StackWithPostProcessor(); @@ -77,7 +77,7 @@ export = { } }); - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { myResource: { Type: 'AWS::MyResource', Properties: @@ -146,7 +146,7 @@ export = { new Include(stack, 'Include', { template }); - const output = stack.toCloudFormation(); + const output = stack._toCloudFormation(); test.equal(typeof output.Description, 'string'); test.done(); @@ -167,7 +167,7 @@ export = { // this happens as part of app.run(). app.node.prepareTree(); - test.deepEqual(stack1.toCloudFormation(), { + test.deepEqual(stack1._toCloudFormation(), { Outputs: { ExportsOutputRefAWSAccountIdAD568057: { Value: { Ref: 'AWS::AccountId' }, @@ -176,7 +176,7 @@ export = { } }); - test.deepEqual(stack2.toCloudFormation(), { + test.deepEqual(stack2._toCloudFormation(), { Parameters: { SomeParameter: { Type: 'String', @@ -201,7 +201,7 @@ export = { app.node.prepareTree(); // THEN - test.deepEqual(stack1.toCloudFormation(), { + test.deepEqual(stack1._toCloudFormation(), { Outputs: { ExportsOutputRefAWSAccountIdAD568057: { Value: { Ref: 'AWS::AccountId' }, @@ -210,7 +210,7 @@ export = { } }); - test.deepEqual(stack2.toCloudFormation(), { + test.deepEqual(stack2._toCloudFormation(), { Parameters: { SomeParameter: { Type: 'String', @@ -236,7 +236,7 @@ export = { // this happens as part of app.run(). app.node.prepareTree(); - test.deepEqual(stack2.toCloudFormation(), { + test.deepEqual(stack2._toCloudFormation(), { Outputs: { DemOutput: { Value: { Ref: 'AWS::Region' }, @@ -260,7 +260,7 @@ export = { app.node.prepareTree(); // THEN - test.deepEqual(stack2.toCloudFormation(), { + test.deepEqual(stack2._toCloudFormation(), { Parameters: { SomeParameter: { Type: 'String', @@ -364,7 +364,7 @@ export = { bonjour.overrideLogicalId('BOOM'); // THEN - test.deepEqual(stack.toCloudFormation(), { Resources: + test.deepEqual(stack._toCloudFormation(), { Resources: { BOOM: { Type: 'Resource::Type' }, RefToBonjour: { Type: 'Other::Resource', @@ -379,8 +379,8 @@ class StackWithPostProcessor extends Stack { // ... - public toCloudFormation() { - const template = super.toCloudFormation(); + public _toCloudFormation() { + const template = super._toCloudFormation(); // manipulate template (e.g. rename "Key" to "key") template.Resources.myResource.Properties.Environment.key = diff --git a/packages/@aws-cdk/runtime-values/test/test.rtv.ts b/packages/@aws-cdk/runtime-values/test/test.rtv.ts index e05f9feea1dca..ce965f9bf7436 100644 --- a/packages/@aws-cdk/runtime-values/test/test.rtv.ts +++ b/packages/@aws-cdk/runtime-values/test/test.rtv.ts @@ -13,7 +13,7 @@ export = { new RuntimeValueTest(stack, 'RuntimeValue'); - console.log(JSON.stringify(stack.toCloudFormation(), undefined, 2)); + console.log(JSON.stringify(stack._toCloudFormation(), undefined, 2)); test.done(); } }; diff --git a/packages/aws-cdk/package-lock.json b/packages/aws-cdk/package-lock.json index 5afca94ce20d0..e9500355caadb 100644 --- a/packages/aws-cdk/package-lock.json +++ b/packages/aws-cdk/package-lock.json @@ -98,7 +98,7 @@ }, "@types/mockery": { "version": "1.4.29", - "resolved": "http://registry.npmjs.org/@types/mockery/-/mockery-1.4.29.tgz", + "resolved": "https://registry.npmjs.org/@types/mockery/-/mockery-1.4.29.tgz", "integrity": "sha1-m6It838H43gP/4Ux0aOOYz+UV6U=", "dev": true }, @@ -329,7 +329,7 @@ }, "bl": { "version": "1.2.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", "requires": { "readable-stream": "^2.3.5", @@ -405,7 +405,7 @@ }, "cli-color": { "version": "0.1.7", - "resolved": "http://registry.npmjs.org/cli-color/-/cli-color-0.1.7.tgz", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-0.1.7.tgz", "integrity": "sha1-rcMgD6RxzCEbDaf1ZrcemLnWc0c=", "requires": { "es5-ext": "0.8.x" @@ -436,7 +436,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", @@ -446,7 +446,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" @@ -654,7 +654,7 @@ }, "es6-promisify": { "version": "5.0.0", - "resolved": "http://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", "requires": { "es6-promise": "^4.0.3" @@ -689,7 +689,7 @@ }, "events": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/events/-/events-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, "execa": { @@ -795,7 +795,7 @@ }, "readable-stream": { "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "requires": { "core-util-is": "~1.0.0", @@ -806,7 +806,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "xregexp": { @@ -823,7 +823,7 @@ }, "get-stream": { "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" }, "get-uri": { @@ -917,7 +917,7 @@ }, "http-errors": { "version": "1.6.3", - "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", @@ -1013,7 +1013,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { "builtin-modules": "^1.0.0" @@ -1061,7 +1061,7 @@ }, "json-diff": { "version": "0.3.1", - "resolved": "http://registry.npmjs.org/json-diff/-/json-diff-0.3.1.tgz", + "resolved": "https://registry.npmjs.org/json-diff/-/json-diff-0.3.1.tgz", "integrity": "sha1-bbw64tJeB1p/1xvNmHRFhmb7aBs=", "requires": { "cli-color": "~0.1.6", @@ -1136,7 +1136,7 @@ }, "load-json-file": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "requires": { "graceful-fs": "^4.1.2", @@ -1386,7 +1386,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-key": { @@ -1426,7 +1426,7 @@ }, "pify": { "version": "2.3.0", - "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" }, "prelude-ls": { @@ -1532,7 +1532,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", @@ -1598,7 +1598,7 @@ }, "sax": { "version": "1.2.1", - "resolved": "http://registry.npmjs.org/sax/-/sax-1.2.1.tgz", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=" }, "semver": { @@ -1756,7 +1756,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" @@ -1777,7 +1777,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "supports-color": { @@ -1950,7 +1950,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { "string-width": "^1.0.1", @@ -1972,7 +1972,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", @@ -1982,7 +1982,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" @@ -2006,7 +2006,7 @@ }, "xmlbuilder": { "version": "9.0.7", - "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" }, "xregexp": { diff --git a/packages/decdk/package.json b/packages/decdk/package.json index 61393925d0bda..1da954cd7f51b 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -145,4 +145,4 @@ "engines": { "node": ">= 8.10.0" } -} +} \ No newline at end of file