@agilecustoms/envctl 0.19.0 → 0.19.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.
@@ -72,9 +72,9 @@ export class EnvCtl {
72
72
  }
73
73
  if (env.status === EnvStatus.Deleting) {
74
74
  const time = EnvSizeAvgTime[env.size];
75
- throw new KnownException(`Env status is DELETING, please wait (~${time} min)`);
75
+ throw new KnownException(`Env ${env.key} status is DELETING, please wait (~${time} min)`);
76
76
  }
77
- throw new KnownException(`Env status is ${env.status}, can not run this command`);
77
+ throw new KnownException(`Env ${env.key} status is ${env.status}, can not run this command`);
78
78
  }
79
79
  async init(project, envName, cwd) {
80
80
  const key = this.key(project, envName);
@@ -180,8 +180,8 @@ export class EnvCtl {
180
180
  }
181
181
  console.log('Deleting env');
182
182
  }
183
- const statusMessage = await this.envApi.delete(env);
184
- console.log(statusMessage);
183
+ await this.envApi.delete(env);
184
+ console.log(`Env ${env.key} is scheduled for deletion`);
185
185
  }
186
186
  async destroy(project, envName, tfArgs, force, cwd) {
187
187
  const env = await this.get(project, envName);
@@ -203,9 +203,8 @@ export class EnvCtl {
203
203
  await this.terraformAdapter.destroy(tfEnv, tfArgs, force, cwd);
204
204
  console.log('Unlock env');
205
205
  await this.envApi.activate(env);
206
- console.log('Schedule env metadata deletion');
207
- const statusMessage = await this.envApi.delete(env);
208
- console.log(statusMessage);
206
+ console.log(`Schedule env ${env.key} metadata deletion`);
207
+ await this.envApi.delete(env);
209
208
  console.log('Please wait for ~15 sec before you can create env with same name');
210
209
  }
211
210
  async get(project, envName) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agilecustoms/envctl",
3
3
  "description": "node.js CLI client for manage environments",
4
- "version": "0.19.0",
4
+ "version": "0.19.2",
5
5
  "author": "Alex Chekulaev",
6
6
  "type": "module",
7
7
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "run-delete": " tsc --sourceMap true && npm run run -- delete --cwd ../tt-core",
34
34
  "run-destroy": " tsc --sourceMap true && npm run run -- destroy --cwd ../tt-core",
35
35
  "-": "",
36
- "run-api-create-ephemeral": "tsc --sourceMap true && npm run run -- api-create-ephemeral --env laxa1986 --owner laxa1986 --size min --type dev",
36
+ "run-api-create-ephemeral": "tsc --sourceMap true && npm run run -- api-create-ephemeral --env test --owner laxa1986 --size min --type dev",
37
37
  "run-api-status": " tsc --sourceMap true && npm run run -- status --env test",
38
38
  "run-api-init": " tsc --sourceMap true && npm run run -- init --env test --cwd ../tt-gitops",
39
39
  "run-api-deploy": " tsc --sourceMap true && npm run run -- deploy --env test --cwd ../tt-gitops -var-file=versions.tfvars",