@agilecustoms/envctl 1.15.1 → 1.16.1

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.
@@ -6,10 +6,10 @@ export function createEphemeral(program, configService, envService) {
6
6
  program
7
7
  .command('create-ephemeral')
8
8
  .description('Create bare env w/o resources. Used in CI as first step just to pre-generate token for extension')
9
- .requiredOption('--key <key>', _keys.KEY)
10
9
  .option('--profile <profile>', _keys.PROFILE)
11
- .action(wrap(async (options) => {
12
- const { key, profile } = options;
10
+ .argument('<key>', _keys.KEY)
11
+ .action(wrap(async (key, options) => {
12
+ const { profile } = options;
13
13
  configService.init(profile);
14
14
  const token = await envService.createEphemeral(key);
15
15
  console.log(token);
@@ -6,11 +6,11 @@ export function deleteIt(program, configService, envService) {
6
6
  program
7
7
  .command('delete')
8
8
  .description('Delete a development environment')
9
- .option('--key <key>', _keys.KEY)
10
9
  .option('--force', _keys.FORCE)
11
10
  .option('--profile <profile>', _keys.PROFILE)
12
- .action(wrap(async (options) => {
13
- const { key, force, profile } = options;
11
+ .argument('[key]', _keys.KEY)
12
+ .action(wrap(async (key, options) => {
13
+ const { force, profile } = options;
14
14
  configService.init(profile);
15
15
  await envService.delete(Boolean(force), key);
16
16
  }));
@@ -6,10 +6,10 @@ export function logs(program, configService, logService) {
6
6
  program
7
7
  .command('logs')
8
8
  .description('Get most recent env destroy logs')
9
- .option('--key <key>', _keys.KEY)
10
9
  .option('--profile <profile>', _keys.PROFILE)
11
- .action(wrap(async (options) => {
12
- const { key, profile } = options;
10
+ .argument('[key]', _keys.KEY)
11
+ .action(wrap(async (key, options) => {
12
+ const { profile } = options;
13
13
  configService.init(profile);
14
14
  await logService.getLogs(key);
15
15
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilecustoms/envctl",
3
- "version": "1.15.1",
3
+ "version": "1.16.1",
4
4
  "description": "node.js CLI client for manage environments",
5
5
  "keywords": [
6
6
  "terraform wrapper",
@@ -57,7 +57,7 @@
57
57
  "run-delete": " CWD=../tt-gitops npm run it -- delete",
58
58
  "run-destroy": "AWS_PROFILE=ac-tt-dev-destroyer CWD=../tt-gitops npm run it -- destroy -var-file=versions.tfvars",
59
59
  "-": "",
60
- "run-ephemeral-create": " npm run it -- create-ephemeral --key test",
60
+ "run-ephemeral-create": " npm run it -- create-ephemeral test",
61
61
  "run-ephemeral-init": "cd ../tt-gitops && terraform init -upgrade -backend-config=key=test -reconfigure",
62
62
  "run-ephemeral-status": " CWD=../tt-gitops npm run it -- status test",
63
63
  "run-ephemeral-deploy": " CWD=../tt-gitops npm run it -- deploy -var-file=versions.tfvars",