@clawcard/cli 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
@@ -49,19 +49,7 @@ async function pollForToken(code, timeout = 120_000) {
49
49
  const data = await res.json();
50
50
 
51
51
  if (data.status === "complete" && data.token) {
52
- // Fetch email using the token
53
- let email = "";
54
- try {
55
- const meRes = await fetch(`${BASE_URL}/api/me`, {
56
- headers: { Authorization: `Bearer ${data.token}` },
57
- });
58
- const me = await meRes.json();
59
- email = me.email || "";
60
- } catch {
61
- // non-critical
62
- }
63
-
64
- return { token: data.token, email };
52
+ return { token: data.token, email: data.email || "" };
65
53
  }
66
54
  } catch {
67
55
  // network error, keep polling
@@ -57,18 +57,7 @@ async function pollForToken(code, timeout = 120_000) {
57
57
  const data = await res.json();
58
58
 
59
59
  if (data.status === "complete" && data.token) {
60
- let email = "";
61
- try {
62
- const meRes = await fetch(`${BASE_URL}/api/me`, {
63
- headers: { Authorization: `Bearer ${data.token}` },
64
- });
65
- const me = await meRes.json();
66
- email = me.email || "";
67
- } catch {
68
- // non-critical
69
- }
70
-
71
- return { token: data.token, email };
60
+ return { token: data.token, email: data.email || "" };
72
61
  }
73
62
  } catch {
74
63
  // network error, keep polling