@prave/cli 1.4.5 → 1.4.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/dist/commands/whoami.js +15 -1
- package/package.json +2 -2
package/dist/commands/whoami.js
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import { planLabel } from '@prave/shared';
|
|
1
2
|
import { track } from '../lib/analytics.js';
|
|
2
3
|
import { ApiError, api } from '../lib/api.js';
|
|
3
4
|
import { loadCredentials } from '../lib/credentials.js';
|
|
4
5
|
import { log } from '../utils/logger.js';
|
|
6
|
+
/**
|
|
7
|
+
* Map the server's internal plan id (`free | explorer | creator`) to the
|
|
8
|
+
* user-facing label (`Free | Pro | Max`). The internal IDs predate the
|
|
9
|
+
* Pro/Max rename and stay frozen because Stripe price env vars + every
|
|
10
|
+
* existing customer row in `profiles.plan` already use them. The label
|
|
11
|
+
* is the only thing that ever surfaces in UI / CLI copy.
|
|
12
|
+
*/
|
|
13
|
+
function planDisplay(plan) {
|
|
14
|
+
if (plan === 'free' || plan === 'explorer' || plan === 'creator') {
|
|
15
|
+
return planLabel(plan);
|
|
16
|
+
}
|
|
17
|
+
return plan;
|
|
18
|
+
}
|
|
5
19
|
/**
|
|
6
20
|
* `prave whoami` — quick check that the local credentials still authenticate
|
|
7
21
|
* against the API. Hits `GET /api/v1/me` so the displayed name is always the
|
|
@@ -36,7 +50,7 @@ export async function whoamiCommand() {
|
|
|
36
50
|
log.kv('user', handle);
|
|
37
51
|
if (data.email)
|
|
38
52
|
log.kv('email', data.email);
|
|
39
|
-
log.kv('plan', data.plan);
|
|
53
|
+
log.kv('plan', planDisplay(data.plan));
|
|
40
54
|
}
|
|
41
55
|
catch (err) {
|
|
42
56
|
if (err instanceof ApiError && err.status === 401) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prave/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "Prave CLI — discover, install, version, test, and ship Claude Skills. The developer platform for the complete Skill lifecycle.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"ora": "^8.0.1",
|
|
55
55
|
"tar": "^7.4.3",
|
|
56
56
|
"undici": "^6.18.0",
|
|
57
|
-
"@prave/shared": "1.4.
|
|
57
|
+
"@prave/shared": "1.4.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "^20.12.7",
|