chirpie 1.0.16 → 1.0.18
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 +15 -8
- package/package.json +2 -4
package/dist/index.js
CHANGED
|
@@ -157,7 +157,7 @@ function getClient() {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// src/commands/post.ts
|
|
160
|
-
var postCommand = new Command3("post").description("Create a post").argument("<text>", "Post text").option("-a, --account <id>", "Account ID").option("-m, --media <urls...>", "Media URLs. Per-platform caps: X/Bluesky/Mastodon 4, LinkedIn 4, Threads/Pinterest/YouTube/GBP
|
|
160
|
+
var postCommand = new Command3("post").description("Create a post").argument("<text>", "Post text").option("-a, --account <id>", "Account ID").option("-m, --media <urls...>", "Media URLs. Per-platform caps: X/Bluesky/Mastodon 4, LinkedIn 4, Threads/Pinterest/YouTube/GBP 1, Instagram/Facebook/Telegram 10, TikTok up to 35 photos.").option("-s, --schedule <datetime>", "Schedule for later. Any ISO 8601 timestamp with a timezone (2026-04-01T14:00:00Z or 2026-04-01T16:00:00+02:00). Posts publish within ~5 minutes of the scheduled time.").option("--json", "Output raw JSON").action(async (text, opts) => {
|
|
161
161
|
const client = getClient();
|
|
162
162
|
let accountId = opts.account;
|
|
163
163
|
if (!accountId) {
|
|
@@ -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(
|
|
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
|
-
|
|
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);
|
|
@@ -385,7 +394,7 @@ async function readSecretFromStdin(prompt) {
|
|
|
385
394
|
stdin.on("data", onData);
|
|
386
395
|
});
|
|
387
396
|
}
|
|
388
|
-
var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook, Telegram,
|
|
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) => {
|
|
389
398
|
const client = getClient();
|
|
390
399
|
try {
|
|
391
400
|
const accounts = await client.listAccounts();
|
|
@@ -613,12 +622,10 @@ xKeysCommand.command("remove").description("Remove your own X developer app cred
|
|
|
613
622
|
}
|
|
614
623
|
});
|
|
615
624
|
var comingSoonCli = [
|
|
616
|
-
{ cmd: "connect-reddit", label: "Reddit" },
|
|
617
625
|
{ cmd: "connect-pinterest", label: "Pinterest" },
|
|
618
626
|
{ cmd: "connect-tiktok", label: "TikTok" },
|
|
619
627
|
{ cmd: "connect-youtube", label: "YouTube" },
|
|
620
|
-
{ cmd: "connect-google-business", label: "Google Business Profile" }
|
|
621
|
-
{ cmd: "connect-snapchat", label: "Snapchat" }
|
|
628
|
+
{ cmd: "connect-google-business", label: "Google Business Profile" }
|
|
622
629
|
];
|
|
623
630
|
for (const { cmd, label } of comingSoonCli) {
|
|
624
631
|
accountsCommand.command(cmd).description(`Connect a ${label} account (coming soon)`).action(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chirpie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "Chirpie CLI — post to social media from the command line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,17 +36,15 @@
|
|
|
36
36
|
"instagram",
|
|
37
37
|
"facebook",
|
|
38
38
|
"telegram",
|
|
39
|
-
"reddit",
|
|
40
39
|
"pinterest",
|
|
41
40
|
"tiktok",
|
|
42
41
|
"youtube",
|
|
43
42
|
"google-business",
|
|
44
|
-
"snapchat",
|
|
45
43
|
"scheduling"
|
|
46
44
|
],
|
|
47
45
|
"license": "MIT",
|
|
48
46
|
"dependencies": {
|
|
49
|
-
"@chirpie/sdk": "^1.0.
|
|
47
|
+
"@chirpie/sdk": "^1.0.16",
|
|
50
48
|
"commander": "^13"
|
|
51
49
|
},
|
|
52
50
|
"devDependencies": {
|