diff --git a/packages/@aws-cdk/assert/package.json b/packages/@aws-cdk/assert/package.json index bbce76c0191e7..9edf5021888e6 100644 --- a/packages/@aws-cdk/assert/package.json +++ b/packages/@aws-cdk/assert/package.json @@ -29,7 +29,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 7c31b779cfbb3..aa3a5a005ef91 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -63,7 +63,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "aws-sdk": "^2.653.0", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-sam/package.json b/packages/@aws-cdk/aws-sam/package.json index e578baf2743a3..98c51071025eb 100644 --- a/packages/@aws-cdk/aws-sam/package.json +++ b/packages/@aws-cdk/aws-sam/package.json @@ -64,7 +64,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^24.9.0", diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index 7a14fc02759a7..9da24c30ca3dc 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -66,7 +66,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0" diff --git a/packages/@aws-cdk/cloudformation-diff/package.json b/packages/@aws-cdk/cloudformation-diff/package.json index 1de78e28747cc..135b66cdde0dc 100644 --- a/packages/@aws-cdk/cloudformation-diff/package.json +++ b/packages/@aws-cdk/cloudformation-diff/package.json @@ -38,7 +38,7 @@ "table": "^5.4.6" }, "devDependencies": { - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "@types/string-width": "^4.0.1", "@types/table": "^4.0.7", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/cx-api/package.json b/packages/@aws-cdk/cx-api/package.json index c49e5b937deed..a16e58add950d 100644 --- a/packages/@aws-cdk/cx-api/package.json +++ b/packages/@aws-cdk/cx-api/package.json @@ -66,7 +66,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "@types/mock-fs": "^4.10.0", "@types/semver": "^7.1.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index d4ef6b13e4829..f36d93ce610d1 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -41,7 +41,7 @@ }, "license": "Apache-2.0", "devDependencies": { - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "cdk-build-tools": "0.0.0", "jest": "^24.9.0", "pkglint": "0.0.0", diff --git a/packages/@monocdk-experiment/rewrite-imports/package.json b/packages/@monocdk-experiment/rewrite-imports/package.json index 39905687588c7..1942d982774c5 100644 --- a/packages/@monocdk-experiment/rewrite-imports/package.json +++ b/packages/@monocdk-experiment/rewrite-imports/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@types/glob": "^7.1.1", - "@types/jest": "^25.1.5", + "@types/jest": "^25.2.1", "@types/node": "^10.17.18", "cdk-build-tools": "0.0.0", "pkglint": "0.0.0" diff --git a/packages/aws-cdk/lib/api/util/cloudformation.ts b/packages/aws-cdk/lib/api/util/cloudformation.ts index 3bf7a06ab982a..48b765dc7136d 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation.ts @@ -37,6 +37,12 @@ export class CloudFormationStack { protected constructor(private readonly cfn: CloudFormation, public readonly stackName: string, private readonly stack?: CloudFormation.Stack) { } + /** + * Retrieve the stack's deployed template + * + * Cached, so will only be retrieved once. Will throw an error + * if the stack does not exist. + */ public async template(): Promise