chirpie 1.0.24 → 1.0.26
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/index.js +16 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -397,10 +397,14 @@ async function readSecretFromStdin(prompt) {
|
|
|
397
397
|
var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook, Telegram, Pinterest, TikTok, YouTube, and Google Business Profile)").option("--json", "Output raw JSON").action(async (opts) => {
|
|
398
398
|
const client = getClient();
|
|
399
399
|
try {
|
|
400
|
-
const
|
|
400
|
+
const list = await client.listAccountsWithLimits();
|
|
401
|
+
const { accounts, accounts_limit, accounts_active } = list;
|
|
401
402
|
if (opts.json) {
|
|
402
|
-
json(
|
|
403
|
+
json(list);
|
|
403
404
|
} else {
|
|
405
|
+
info(
|
|
406
|
+
accounts_limit === null ? `${accounts_active} accounts` : `${accounts_active} / ${accounts_limit} accounts`
|
|
407
|
+
);
|
|
404
408
|
table(
|
|
405
409
|
accounts.map((a) => ({
|
|
406
410
|
id: a.id.slice(0, 8),
|
|
@@ -408,6 +412,8 @@ var accountsCommand = new Command6("accounts").description("List connected socia
|
|
|
408
412
|
username: a.platform === "x" ? `@${a.username}` : a.username,
|
|
409
413
|
name: a.display_name ?? "",
|
|
410
414
|
active: a.is_active ? "\u2713" : "\u2717",
|
|
415
|
+
// What `chirpie accounts deactivate <id>` would cancel.
|
|
416
|
+
scheduled: a.scheduled_posts ?? 0,
|
|
411
417
|
// Inactive accounts are listed too, so a Facebook Page that was
|
|
412
418
|
// connected past the plan's account limit is visible and can be
|
|
413
419
|
// switched on with `chirpie accounts activate <id>`.
|
|
@@ -434,7 +440,9 @@ accountsCommand.command("activate").argument("<id>", "Account ID (from `chirpie
|
|
|
434
440
|
process.exit(1);
|
|
435
441
|
}
|
|
436
442
|
});
|
|
437
|
-
accountsCommand.command("deactivate").argument("<id>", "Account ID (from `chirpie accounts`)").description(
|
|
443
|
+
accountsCommand.command("deactivate").argument("<id>", "Account ID (from `chirpie accounts`)").description(
|
|
444
|
+
"Deactivate a connected account (stays connected, frees a plan slot, cancels its scheduled posts)"
|
|
445
|
+
).option("--json", "Output raw JSON").action(async (id, opts) => {
|
|
438
446
|
const client = getClient();
|
|
439
447
|
try {
|
|
440
448
|
const account = await client.deactivateAccount(id);
|
|
@@ -444,6 +452,11 @@ accountsCommand.command("deactivate").argument("<id>", "Account ID (from `chirpi
|
|
|
444
452
|
success(
|
|
445
453
|
`Deactivated ${account.display_name ?? account.username} (${account.platform})`
|
|
446
454
|
);
|
|
455
|
+
if (account.canceled_posts > 0) {
|
|
456
|
+
success(
|
|
457
|
+
`Cancelled ${account.canceled_posts} scheduled post${account.canceled_posts === 1 ? "" : "s"} and returned them to your monthly quota. Activating the account again does not restore them.`
|
|
458
|
+
);
|
|
459
|
+
}
|
|
447
460
|
}
|
|
448
461
|
} catch (err) {
|
|
449
462
|
error(err instanceof Error ? err.message : "Failed to deactivate account");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chirpie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "Chirpie CLI: post to social media from the command line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@chirpie/sdk": "^1.0.
|
|
47
|
+
"@chirpie/sdk": "^1.0.24",
|
|
48
48
|
"commander": "^13"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|