@adobe/helix-deploy 9.0.1 → 9.0.2

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
@@ -1,3 +1,10 @@
1
+ ## [9.0.2](https://github.com/adobe/helix-deploy/compare/v9.0.1...v9.0.2) (2023-02-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * close clients on destroy ([#498](https://github.com/adobe/helix-deploy/issues/498)) ([b30404d](https://github.com/adobe/helix-deploy/commit/b30404de570783f0aae8af8ee0bebdecfacda20b))
7
+
1
8
  ## [9.0.1](https://github.com/adobe/helix-deploy/compare/v9.0.0...v9.0.1) (2023-01-31)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-deploy",
3
- "version": "9.0.1",
3
+ "version": "9.0.2",
4
4
  "description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/adobe/helix-deploy#readme",
@@ -155,12 +155,18 @@ export default class AWSDeployer extends BaseDeployer {
155
155
  }
156
156
 
157
157
  async initAccountId() {
158
- const sts = new STSClient({
159
- region: this._cfg.region,
160
- });
161
- const ret = await sts.send(new GetCallerIdentityCommand());
162
- this._accountId = ret.Account;
163
- this.log.info(chalk`{green ok:} initialized AWS deployer for account {yellow ${ret.Account}}`);
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,14 @@ 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
+ }
877
891
  }
878
892
 
879
893
  AWSDeployer.Config = AWSConfig;