@agilecustoms/envctl 0.22.1 → 0.22.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.
@@ -148,20 +148,13 @@ export class EnvCtl {
148
148
  }
149
149
  async delete(project, envName, force, cwd) {
150
150
  const env = await this.get(project, envName);
151
- this.checkStatus(env);
152
- if (env.status === EnvStatus.Init) {
153
- await this.envApi.delete(env);
154
- console.log(`Env ${env.key} is deleted`);
155
- return;
156
- }
157
- if (force) {
158
- console.log('Force deletion');
159
- if (env.status === EnvStatus.Deploying || env.status === EnvStatus.Updating) {
160
- console.log(`Env status is ${env.status}, will unlock it`);
161
- await this.envApi.activate(env);
151
+ if (!force) {
152
+ this.checkStatus(env);
153
+ if (env.status === EnvStatus.Init) {
154
+ await this.envApi.delete(env);
155
+ console.log(`Env ${env.key} is deleted`);
156
+ return;
162
157
  }
163
- }
164
- else {
165
158
  const kind = this.cliHelper.ensureKind(undefined, cwd);
166
159
  if (env.kind && env.kind !== kind) {
167
160
  const answerYes = await this.cliHelper.promptYesNo(`Env ${env.key} kind (dir-name): ${env.kind}\n`
@@ -176,8 +169,8 @@ export class EnvCtl {
176
169
  if (env.status !== EnvStatus.Active) {
177
170
  return;
178
171
  }
179
- console.log('Deleting env');
180
172
  }
173
+ console.log('Deleting env');
181
174
  const message = await this.envApi.delete(env);
182
175
  console.log(message);
183
176
  }
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.22.1",
4
+ "version": "0.22.3",
5
5
  "author": "Alex Chekulaev",
6
6
  "type": "module",
7
7
  "bin": {