@jarxyz/cli 0.0.1 → 0.0.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.
- package/dist/main.js +7 -7
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -17439,7 +17439,7 @@ async function handleLogout(store, skipConfirm) {
|
|
|
17439
17439
|
async function handleAuthStatus(store) {
|
|
17440
17440
|
const tokenSet = await store.load();
|
|
17441
17441
|
if (!tokenSet) {
|
|
17442
|
-
M2.warning("Not logged in. Run `
|
|
17442
|
+
M2.warning("Not logged in. Run `jargo login` to authenticate.");
|
|
17443
17443
|
return "";
|
|
17444
17444
|
}
|
|
17445
17445
|
if (tokenSet.method === "api-key") {
|
|
@@ -25819,11 +25819,11 @@ class AuthRequiredError extends Error {
|
|
|
25819
25819
|
async function createCliClient(store2) {
|
|
25820
25820
|
let tokenSet = await store2.load();
|
|
25821
25821
|
if (!tokenSet) {
|
|
25822
|
-
throw new AuthRequiredError("Not authenticated. Run `
|
|
25822
|
+
throw new AuthRequiredError("Not authenticated. Run `jargo login` first.");
|
|
25823
25823
|
}
|
|
25824
25824
|
if (tokenSet.method === "api-key") {
|
|
25825
25825
|
if (!tokenSet.apiKey) {
|
|
25826
|
-
throw new AuthRequiredError("API key missing. Run `
|
|
25826
|
+
throw new AuthRequiredError("API key missing. Run `jargo login` to re-authenticate.");
|
|
25827
25827
|
}
|
|
25828
25828
|
const client3 = createApiClient({
|
|
25829
25829
|
baseURL: tokenSet.apiUrl
|
|
@@ -25833,14 +25833,14 @@ async function createCliClient(store2) {
|
|
|
25833
25833
|
}
|
|
25834
25834
|
if (store2.isExpired(tokenSet)) {
|
|
25835
25835
|
if (!tokenSet.refreshToken) {
|
|
25836
|
-
throw new AuthRequiredError("Token expired. Run `
|
|
25836
|
+
throw new AuthRequiredError("Token expired. Run `jargo login` to re-authenticate.");
|
|
25837
25837
|
}
|
|
25838
25838
|
const refreshed = await refreshTokenSet(tokenSet);
|
|
25839
25839
|
if (refreshed) {
|
|
25840
25840
|
await store2.save(refreshed);
|
|
25841
25841
|
tokenSet = refreshed;
|
|
25842
25842
|
} else {
|
|
25843
|
-
throw new AuthRequiredError("Token expired and refresh failed. Run `
|
|
25843
|
+
throw new AuthRequiredError("Token expired and refresh failed. Run `jargo login` to re-authenticate.");
|
|
25844
25844
|
}
|
|
25845
25845
|
}
|
|
25846
25846
|
const client2 = createAuthenticatedClient(() => tokenSet.accessToken, tokenSet.apiUrl);
|
|
@@ -26434,8 +26434,8 @@ var analyticsCommand = defineCommand({
|
|
|
26434
26434
|
// src/main.ts
|
|
26435
26435
|
var main = defineCommand({
|
|
26436
26436
|
meta: {
|
|
26437
|
-
name: "
|
|
26438
|
-
version: "0.0.
|
|
26437
|
+
name: "jargo",
|
|
26438
|
+
version: "0.0.3",
|
|
26439
26439
|
description: "Jar CLI - Personal finance tracker"
|
|
26440
26440
|
},
|
|
26441
26441
|
subCommands: {
|