chirpie 1.0.25 → 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.
Files changed (2) hide show
  1. package/dist/index.js +10 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -412,6 +412,8 @@ var accountsCommand = new Command6("accounts").description("List connected socia
412
412
  username: a.platform === "x" ? `@${a.username}` : a.username,
413
413
  name: a.display_name ?? "",
414
414
  active: a.is_active ? "\u2713" : "\u2717",
415
+ // What `chirpie accounts deactivate <id>` would cancel.
416
+ scheduled: a.scheduled_posts ?? 0,
415
417
  // Inactive accounts are listed too, so a Facebook Page that was
416
418
  // connected past the plan's account limit is visible and can be
417
419
  // switched on with `chirpie accounts activate <id>`.
@@ -438,7 +440,9 @@ accountsCommand.command("activate").argument("<id>", "Account ID (from `chirpie
438
440
  process.exit(1);
439
441
  }
440
442
  });
441
- accountsCommand.command("deactivate").argument("<id>", "Account ID (from `chirpie accounts`)").description("Deactivate a connected account (stays connected, frees a plan slot)").option("--json", "Output raw JSON").action(async (id, opts) => {
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) => {
442
446
  const client = getClient();
443
447
  try {
444
448
  const account = await client.deactivateAccount(id);
@@ -448,6 +452,11 @@ accountsCommand.command("deactivate").argument("<id>", "Account ID (from `chirpi
448
452
  success(
449
453
  `Deactivated ${account.display_name ?? account.username} (${account.platform})`
450
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
+ }
451
460
  }
452
461
  } catch (err) {
453
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.25",
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.23",
47
+ "@chirpie/sdk": "^1.0.24",
48
48
  "commander": "^13"
49
49
  },
50
50
  "devDependencies": {