chirpie 1.1.0 → 1.1.2

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 CHANGED
@@ -50,7 +50,7 @@ export CHIRPIE_API_KEY=chirpie_sk_...
50
50
  | `chirpie accounts connect-linkedin --pages` | Connect the LinkedIn Pages you administer, each as its own account (coming soon) |
51
51
  | `chirpie accounts connect-telegram` | Connect a Telegram bot to a channel or group |
52
52
  | `chirpie accounts x-keys set` / `status` / `remove` | Use your own X developer app |
53
- | `chirpie analytics <post_id>` | Engagement metrics for a published post. `--refresh` asks the platform now instead of reading the stored snapshot, once per post every 30 minutes |
53
+ | `chirpie analytics <post_id>` | Engagement metrics for a published post. `--refresh` asks the platform now instead of reading the stored snapshot, once per post every 5 minutes |
54
54
  | `chirpie keys` / `keys create` / `keys revoke <id>` | Manage API keys. `keys create --scope posts:write --scope media:write` mints a key that can do less than yours; `chirpie keys` prints each key's scopes |
55
55
 
56
56
  Run `chirpie <command> --help` for the full option list. Threads, Instagram, Facebook, Pinterest, TikTok, YouTube and Google Business Profile are coming soon. Accounts already connected keep posting and scheduling as normal.
package/dist/index.js CHANGED
@@ -1249,7 +1249,7 @@ for (const { cmd, label } of comingSoonCli) {
1249
1249
  }
1250
1250
 
1251
1251
  // src/commands/comments.ts
1252
- import { Command as Command7 } from "commander";
1252
+ import { Command as Command7, Option } from "commander";
1253
1253
  var PREVIEW_CHARS = 60;
1254
1254
  function commentAuthorLabel(comment) {
1255
1255
  const displayName = comment.author.display_name?.trim();
@@ -1259,14 +1259,21 @@ function commentAuthorLabel(comment) {
1259
1259
  return "Unknown commenter";
1260
1260
  }
1261
1261
  function commentRowText(comment) {
1262
- if (comment.deleted) return "[deleted]";
1263
1262
  const flat = comment.text.replace(/\s+/gu, " ").trim();
1264
1263
  const chars = [...flat];
1265
1264
  if (chars.length <= PREVIEW_CHARS) return flat;
1266
1265
  return chars.slice(0, PREVIEW_CHARS).join("").trimEnd() + "\u2026";
1267
1266
  }
1267
+ function commentState(comment) {
1268
+ if (comment.deleted) return "deleted";
1269
+ if (comment.hidden) return "hidden";
1270
+ return "";
1271
+ }
1268
1272
  var commentsCommand = new Command7("comments").description("List, reply to, hide, or delete the comments on a post").option("--json", "Output raw JSON");
1269
- commentsCommand.command("list").description("List the comments on a post you published").argument("<post_id>", "Post ID").option("--limit <n>", "Comments to show (default 25, max 100)").option("--cursor <cursor>", "The next_cursor from the previous page").option("--since <datetime>", "Only comments posted after this ISO 8601 time").option("--no-sync", "Show the stored comments without refreshing them").option("--hidden", "Include comments you have hidden").option("--json", "Output raw JSON").action(async (postId, opts, cmd) => {
1273
+ commentsCommand.command("list").description("List the comments on a post you published").argument("<post_id>", "Post ID").option("--limit <n>", "Comments to show (default 25, max 100)").option("--cursor <cursor>", "The next_cursor from the previous page").option("--since <datetime>", "Only comments posted after this ISO 8601 time").option("--no-sync", "Show the stored comments without refreshing them").option("--include-hidden", "Include comments you have hidden").option(
1274
+ "--include-deleted",
1275
+ "Include deleted comments, with the last text Chirpie stored for them"
1276
+ ).addOption(new Option("--hidden").hideHelp()).option("--json", "Output raw JSON").action(async (postId, opts, cmd) => {
1270
1277
  const client = getClient();
1271
1278
  try {
1272
1279
  const result = await client.listComments(postId, {
@@ -1277,7 +1284,8 @@ commentsCommand.command("list").description("List the comments on a post you pub
1277
1284
  // otherwise, which is not the same as asking for a refresh now: the
1278
1285
  // default is the server's own `auto`.
1279
1286
  sync: opts.sync === false ? false : void 0,
1280
- include_hidden: opts.hidden ? true : void 0
1287
+ include_hidden: opts.includeHidden || opts.hidden ? true : void 0,
1288
+ include_deleted: opts.includeDeleted ? true : void 0
1281
1289
  });
1282
1290
  if (wantsJson(opts, cmd)) {
1283
1291
  json(result);
@@ -1292,6 +1300,7 @@ commentsCommand.command("list").description("List the comments on a post you pub
1292
1300
  author: commentAuthorLabel(comment),
1293
1301
  time: comment.created_at.slice(0, 16).replace("T", " "),
1294
1302
  text: commentRowText(comment),
1303
+ state: commentState(comment),
1295
1304
  replied: comment.replied ? "\u2713" : ""
1296
1305
  }))
1297
1306
  );
@@ -1376,7 +1385,7 @@ async function confirm2(question) {
1376
1385
  import { Command as Command8 } from "commander";
1377
1386
  var analyticsCommand = new Command8("analytics").description("Get analytics for a post").argument("<post_id>", "Post ID").option(
1378
1387
  "--refresh",
1379
- "Ask the platform now instead of reading the stored numbers. Allowed once per post every 30 minutes"
1388
+ "Ask the platform now instead of reading the stored numbers. Allowed once per post every 5 minutes"
1380
1389
  ).option("--json", "Output raw JSON").action(async (postId, opts) => {
1381
1390
  const client = getClient();
1382
1391
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chirpie",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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.1.0",
47
+ "@chirpie/sdk": "^1.1.2",
48
48
  "commander": "^13"
49
49
  },
50
50
  "devDependencies": {