aws-architect 6.7.86 → 6.7.89
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 +2 -0
- package/lib/CloudFormationDeployer.js +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,8 @@ This is the changelog for [AWS Architect](readme.md).
|
|
|
8
8
|
* Support pnpm lock files
|
|
9
9
|
* Support the new version of openapi-factory 5.4.
|
|
10
10
|
* Duplicate all .html files as cleaned files. `file.html` => `file` and `file/`, all three will work
|
|
11
|
+
* Fix validateTemplate so that it actually uses S3 when available.
|
|
12
|
+
* Add support for new status `CONFIGURATION_COMPLETE`
|
|
11
13
|
|
|
12
14
|
## 6.6 ##
|
|
13
15
|
* Add support to `deleteWebsiteVersion(version)`
|
|
@@ -3,6 +3,7 @@ const Tmp = require('tmp');
|
|
|
3
3
|
Tmp.setGracefulCleanup();
|
|
4
4
|
const fs = require('fs-extra');
|
|
5
5
|
const isEqual = require('lodash.isequal');
|
|
6
|
+
const shortUuid = require('short-uuid');
|
|
6
7
|
|
|
7
8
|
function tryParseJson(stringContent) {
|
|
8
9
|
try {
|
|
@@ -29,8 +30,8 @@ class CloudFormationDeployer {
|
|
|
29
30
|
|
|
30
31
|
async validateTemplate(template, stackName, bucketDeploymentKey) {
|
|
31
32
|
let templateString = this.getTemplateBody(template);
|
|
32
|
-
if (
|
|
33
|
-
let templateRelativeUrl = `${bucketDeploymentKey}/${stackName}.cloudformation.template`;
|
|
33
|
+
if (this.deploymentBucket) {
|
|
34
|
+
let templateRelativeUrl = `${bucketDeploymentKey}/${stackName || shortUuid('abcdefghijklmnopqrstuvwxyz0123456789').generate()}.cloudformation.template`;
|
|
34
35
|
await new Promise((resolve, reject) => {
|
|
35
36
|
Tmp.file(async (err, path) => {
|
|
36
37
|
if (err) {
|
|
@@ -66,6 +67,7 @@ class CloudFormationDeployer {
|
|
|
66
67
|
}
|
|
67
68
|
let stackStatus = data.Stacks[0].StackStatus;
|
|
68
69
|
let stackExistsDict = {
|
|
70
|
+
CONFIGURATION_COMPLETE: true,
|
|
69
71
|
CREATE_COMPLETE: true,
|
|
70
72
|
UPDATE_COMPLETE: true,
|
|
71
73
|
UPDATE_ROLLBACK_COMPLETE: true
|
|
@@ -140,7 +142,7 @@ class CloudFormationDeployer {
|
|
|
140
142
|
throw { title: 'Deployment to the stack failed.', status: stackStatus, code: stackStatus };
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
if (stackStatus.match(/PROGRESS$/i)) {
|
|
145
|
+
if (stackStatus.match(/PROGRESS$/i) || stackStatus === 'CONFIGURATION_COMPLETE') {
|
|
144
146
|
return iteratePromise();
|
|
145
147
|
}
|
|
146
148
|
|
|
@@ -376,7 +378,7 @@ class CloudFormationDeployer {
|
|
|
376
378
|
|
|
377
379
|
// If the stack already existed, and there are no new regions, all the stacks are updated then check to see if the template matches the new template
|
|
378
380
|
if (stackExists && !newRegions && existingStacks.every(s => s.Status === 'CURRENT')) {
|
|
379
|
-
const regionStacks = await this.cloudFormationClient.listStacks({ StackStatusFilter: ['CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE'] }).promise()
|
|
381
|
+
const regionStacks = await this.cloudFormationClient.listStacks({ StackStatusFilter: ['CONFIGURATION_COMPLETE', 'CREATE_COMPLETE', 'UPDATE_COMPLETE', 'UPDATE_ROLLBACK_COMPLETE'] }).promise()
|
|
380
382
|
.then(r => r.StackSummaries);
|
|
381
383
|
|
|
382
384
|
const thisRegionsStackId = existingStacks.find(s => s.Region === this.cloudFormationClient.config.region).StackId;
|