chirpie 1.0.17 → 1.0.19

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 +12 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -324,11 +324,20 @@ postsCommand.command("get <id>").description("Get a post by ID").option("--json"
324
324
  process.exit(1);
325
325
  }
326
326
  });
327
- postsCommand.command("delete <id>").description("Delete a post").action(async (id) => {
327
+ postsCommand.command("delete <id>").description(
328
+ "Delete a post (deleting any post of a scheduled thread cancels the thread)"
329
+ ).action(async (id) => {
328
330
  const client = getClient();
329
331
  try {
330
- await client.deletePost(id);
331
- success(`Post ${id} deleted`);
332
+ const result = await client.deletePost(id);
333
+ const cancelled = result.cancelled_ids ?? [];
334
+ if (cancelled.length > 1) {
335
+ success(
336
+ `Scheduled thread canceled (${cancelled.length} posts): ${cancelled.join(", ")}`
337
+ );
338
+ } else {
339
+ success(`Post ${id} deleted`);
340
+ }
332
341
  } catch (err) {
333
342
  error(err instanceof Error ? err.message : "Failed to delete post");
334
343
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chirpie",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
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.15",
47
+ "@chirpie/sdk": "^1.0.17",
48
48
  "commander": "^13"
49
49
  },
50
50
  "devDependencies": {