@tolgee/cli 2.1.7 → 2.1.8

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.
Files changed (2) hide show
  1. package/dist/cli.js +3 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -60,14 +60,14 @@ function loadProjectId(cmd) {
60
60
  }
61
61
  function validateOptions(cmd) {
62
62
  const opts = cmd.optsWithGlobals();
63
+ if (!opts.apiKey) {
64
+ exitWithError('No API key has been provided. You must either provide one via --api-key, or login via `tolgee login`.');
65
+ }
63
66
  if (opts.projectId === -1) {
64
67
  error('No Project ID have been specified. You must either provide one via --project-id, or by setting up a `.tolgeerc` file.');
65
68
  info('Learn more about configuring the CLI here: https://tolgee.io/tolgee-cli/project-configuration');
66
69
  process.exit(1);
67
70
  }
68
- if (!opts.apiKey) {
69
- exitWithError('No API key has been provided. You must either provide one via --api-key, or login via `tolgee login`.');
70
- }
71
71
  }
72
72
  const preHandler = (config) => async function (prog, cmd) {
73
73
  if (!NO_KEY_COMMANDS.includes(topLevelName(cmd))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolgee/cli",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "type": "module",
5
5
  "description": "A tool to interact with the Tolgee Platform through CLI",
6
6
  "repository": {