@jclvsh/dropspace 2.34.0 → 2.35.0
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/README.md +1 -1
- package/dist/commands/account.js +3 -11
- package/dist/tools/account.js +4 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -400,7 +400,7 @@ Autopilot is available on pro and premium plans. `configure_autopilot` takes `me
|
|
|
400
400
|
| Tool | Description |
|
|
401
401
|
| ------------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
402
402
|
| `get_profile` | Get your profile (stdio only) |
|
|
403
|
-
| `update_profile` | Update your
|
|
403
|
+
| `update_profile` | Update your display name, `full_name` (stdio only) |
|
|
404
404
|
| `create_billing_portal_session` | A URL to manage your subscription; pre-authenticated for subscribers, so don't share it (stdio only) |
|
|
405
405
|
|
|
406
406
|
CLI: `dropspace profile get|update`, `dropspace billing portal`.
|
package/dist/commands/account.js
CHANGED
|
@@ -15,19 +15,11 @@ export function registerAccountCommands(program, client) {
|
|
|
15
15
|
});
|
|
16
16
|
profile
|
|
17
17
|
.command("update")
|
|
18
|
-
.description("update your name
|
|
19
|
-
.
|
|
20
|
-
.option("--avatar <url>", "public URL of the avatar image")
|
|
18
|
+
.description("update your display name")
|
|
19
|
+
.requiredOption("-n, --name <name>", "display name (1-120 characters)")
|
|
21
20
|
.action(async (opts) => {
|
|
22
21
|
try {
|
|
23
|
-
const
|
|
24
|
-
if (opts.name)
|
|
25
|
-
body.full_name = opts.name;
|
|
26
|
-
if (opts.avatar)
|
|
27
|
-
body.avatar_url = opts.avatar;
|
|
28
|
-
if (Object.keys(body).length === 0)
|
|
29
|
-
throw new Error("provide --name or --avatar");
|
|
30
|
-
const result = await client.patch("/profile", body);
|
|
22
|
+
const result = await client.patch("/profile", { full_name: opts.name });
|
|
31
23
|
formatOutput(result, getFormat(program.opts()));
|
|
32
24
|
}
|
|
33
25
|
catch (error) {
|
package/dist/tools/account.js
CHANGED
|
@@ -13,17 +13,11 @@ export function registerAccountTools(server, client) {
|
|
|
13
13
|
return fail(error);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
server.tool("update_profile", "update the authenticated user's
|
|
17
|
-
full_name: z.string().min(1).max(120).
|
|
18
|
-
|
|
19
|
-
}, async ({ full_name, avatar_url }) => {
|
|
16
|
+
server.tool("update_profile", "update the authenticated user's display name (full_name). requires the write scope.", {
|
|
17
|
+
full_name: z.string().min(1).max(120).describe("display name (1-120 characters)"),
|
|
18
|
+
}, async ({ full_name }) => {
|
|
20
19
|
try {
|
|
21
|
-
|
|
22
|
-
if (full_name !== undefined)
|
|
23
|
-
body.full_name = full_name;
|
|
24
|
-
if (avatar_url !== undefined)
|
|
25
|
-
body.avatar_url = avatar_url;
|
|
26
|
-
return text(await client.patch("/profile", body));
|
|
20
|
+
return text(await client.patch("/profile", { full_name }));
|
|
27
21
|
}
|
|
28
22
|
catch (error) {
|
|
29
23
|
return fail(error);
|