aws-architect 6.6.21 → 6.6.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,7 @@ This is the changelog for [AWS Architect](readme.md).
4
4
  ## 6.6 ##
5
5
  * Add support to `deleteWebsiteVersion(version)`
6
6
  * Fix `The function must be in an Active state. The current state for function arn:aws:lambda:Function:514 is Pending`.
7
+ * Automatically delete existing ROLLBACK_COMPLETE stacks.
7
8
 
8
9
  ## 6.5 ##
9
10
  * Support APIGW version 2
@@ -56,7 +56,7 @@ class CloudFormationDeployer {
56
56
 
57
57
  stackExists(stackName) {
58
58
  return this.cloudFormationClient.describeStacks({ StackName: stackName }).promise()
59
- .then(data => {
59
+ .then(async data => {
60
60
  if (!data.Stacks[0]) {
61
61
  return false;
62
62
  }
@@ -74,7 +74,9 @@ class CloudFormationDeployer {
74
74
  return false;
75
75
  }
76
76
  if (stackStatus === 'ROLLBACK_COMPLETE') {
77
- throw { error: 'Stack must be deleted manually and cannot be used', status: stackStatus };
77
+ console.log('Current status of stack is ROLLBACK_COMPLETE, deleting before generating a new stack.');
78
+ await this.cloudFormationClient.deleteStack({ StackName: stackName }).promise();
79
+ return false;
78
80
  }
79
81
  throw { error: 'Current status of stack prevents creation or update.', status: stackStatus };
80
82
  }, () => false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-architect",
3
- "version": "6.6.21",
3
+ "version": "6.6.26",
4
4
  "description": "AWS Architect is a node based tool to configure and deploy AWS-based microservices.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "error-object-polyfill": "^1.1.14",
45
45
  "eslint-config-cimpress-atsquad": "^1.0.67",
46
46
  "glob": "^5.0.15",
47
- "mocha": "^9.1.3",
47
+ "mocha": "^9.2.1",
48
48
  "sinon": "^1.17.3"
49
49
  },
50
50
  "repository": {