@adobe/helix-deploy 9.0.1 → 9.0.3
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 +14 -0
- package/package.json +1 -1
- package/src/ActionBuilder.js +3 -3
- package/src/deploy/AWSDeployer.js +22 -6
- package/src/deploy/BaseDeployer.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [9.0.3](https://github.com/adobe/helix-deploy/compare/v9.0.2...v9.0.3) (2023-02-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* wait for close ([#499](https://github.com/adobe/helix-deploy/issues/499)) ([676a04e](https://github.com/adobe/helix-deploy/commit/676a04ec19d494b80f029720a7280c0f20f38b3f))
|
|
7
|
+
|
|
8
|
+
## [9.0.2](https://github.com/adobe/helix-deploy/compare/v9.0.1...v9.0.2) (2023-02-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* close clients on destroy ([#498](https://github.com/adobe/helix-deploy/issues/498)) ([b30404d](https://github.com/adobe/helix-deploy/commit/b30404de570783f0aae8af8ee0bebdecfacda20b))
|
|
14
|
+
|
|
1
15
|
## [9.0.1](https://github.com/adobe/helix-deploy/compare/v9.0.0...v9.0.1) (2023-01-31)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/ActionBuilder.js
CHANGED
|
@@ -356,9 +356,9 @@ export default class ActionBuilder {
|
|
|
356
356
|
return this.execute('cleanup', '');
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
close() {
|
|
359
|
+
async close() {
|
|
360
360
|
if (this.validated) {
|
|
361
|
-
Object.values(this._deployers).
|
|
361
|
+
await Promise.allSettled(Object.values(this._deployers).map((dep) => dep.close()));
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
|
|
@@ -366,7 +366,7 @@ export default class ActionBuilder {
|
|
|
366
366
|
try {
|
|
367
367
|
return await this._run();
|
|
368
368
|
} finally {
|
|
369
|
-
this.close();
|
|
369
|
+
await this.close();
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
|
|
@@ -155,12 +155,18 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
async initAccountId() {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
158
|
+
let sts;
|
|
159
|
+
|
|
160
|
+
try {
|
|
161
|
+
sts = new STSClient({
|
|
162
|
+
region: this._cfg.region,
|
|
163
|
+
});
|
|
164
|
+
const ret = await sts.send(new GetCallerIdentityCommand());
|
|
165
|
+
this._accountId = ret.Account;
|
|
166
|
+
this.log.info(chalk`{green ok:} initialized AWS deployer for account {yellow ${ret.Account}}`);
|
|
167
|
+
} finally {
|
|
168
|
+
sts.destroy();
|
|
169
|
+
}
|
|
164
170
|
}
|
|
165
171
|
|
|
166
172
|
async uploadZIP() {
|
|
@@ -874,6 +880,16 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
874
880
|
throw err;
|
|
875
881
|
}
|
|
876
882
|
}
|
|
883
|
+
|
|
884
|
+
async close() {
|
|
885
|
+
this._s3?.destroy();
|
|
886
|
+
this._lambda?.destroy();
|
|
887
|
+
this._api?.destroy();
|
|
888
|
+
this._ssm?.destroy();
|
|
889
|
+
this._sm?.destroy();
|
|
890
|
+
|
|
891
|
+
await super.close();
|
|
892
|
+
}
|
|
877
893
|
}
|
|
878
894
|
|
|
879
895
|
AWSDeployer.Config = AWSConfig;
|