mstate-cli 0.3.0 → 0.4.0

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/src/index.ts CHANGED
@@ -29,7 +29,7 @@ const [action] = argv.slice(2);
29
29
  break;
30
30
 
31
31
  case CmdAction.PERMISSION:
32
- if (hasFlag(argv, '-d')) await companyHandler.revokePermission();
32
+ if (hasFlag('-d')) await companyHandler.revokePermission();
33
33
  else await companyHandler.addToken();
34
34
  break;
35
35
 
@@ -37,7 +37,7 @@ const [action] = argv.slice(2);
37
37
  companyHandler.handleUpdateSavedSecretKey();
38
38
  break;
39
39
 
40
- case CmdAction.USER:
40
+ case CmdAction.ADD_USER:
41
41
  await companyHandler.addUser();
42
42
  break;
43
43
 
@@ -69,16 +69,16 @@ const [action] = argv.slice(2);
69
69
 
70
70
  default:
71
71
  customLog.error(
72
- `${action ? 'Invalid' : 'Missing'} script: ${action ?? ''}`,
72
+ `${action ? 'Invalid' : 'Missing'} command: ${action ?? ''}`,
73
73
  );
74
74
  console.log(
75
- `use 'mstate [command]? ${CmdAction.HELP_FLAG}, ${CmdAction.HELP}' for getting allowed action`,
75
+ `\t\t use 'mstate <command>? ${CmdAction.HELP_FLAG}, ${CmdAction.HELP}' for getting allowed action`,
76
76
  );
77
77
  }
78
78
  })()
79
79
  .then()
80
80
  .catch((error: any) => {
81
- if (hasFlag(argv, CmdAction.HELP) || hasFlag(argv, CmdAction.HELP_FLAG)) {
81
+ if (hasFlag(CmdAction.HELP) || hasFlag(CmdAction.HELP_FLAG)) {
82
82
  helpHandler.logActionInfo(action as CmdAction);
83
83
  } else customLog.error(error.message);
84
84
  });