@tolgee/cli 2.8.3 → 2.8.4

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.
@@ -66,5 +66,8 @@ export function createApiClient({ baseUrl, apiKey, projectId, autoThrow = false,
66
66
  getApiKeyInfo() {
67
67
  return getApiKeyInformation(apiClient, apiKey);
68
68
  },
69
+ getSettings() {
70
+ return { baseUrl, apiKey, projectId, autoThrow };
71
+ },
69
72
  };
70
73
  }
@@ -5,7 +5,7 @@ export const getApiKeyInformation = async (client, key) => {
5
5
  if (key.startsWith(API_KEY_PAK_PREFIX)) {
6
6
  const loadable = await client.GET('/v2/api-keys/current');
7
7
  if (loadable.response.status === 401) {
8
- exitWithError("Couldn't log in: the API key you provided is invalid.");
8
+ exitWithError(`Couldn't log in: the API key you provided is invalid (${new URL(loadable.response.url).host}).`);
9
9
  }
10
10
  handleLoadableError(loadable);
11
11
  const info = loadable.data;
@@ -24,7 +24,7 @@ export const getApiKeyInformation = async (client, key) => {
24
24
  else {
25
25
  const loadable = await client.GET('/v2/pats/current');
26
26
  if (loadable.response.status === 401) {
27
- exitWithError("Couldn't log in: the API key you provided is invalid.");
27
+ exitWithError(`Couldn't log in: the API key you provided is invalid (${new URL(loadable.response.url).host}).`);
28
28
  }
29
29
  handleLoadableError(loadable);
30
30
  const info = loadable.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolgee/cli",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "type": "module",
5
5
  "description": "A tool to interact with the Tolgee Platform through CLI",
6
6
  "repository": {