chirpie 1.0.9 → 1.0.10
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 +5 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -149,7 +149,7 @@ function getClient() {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/commands/post.ts
|
|
152
|
-
var postCommand = new Command3("post").description("Create a post
|
|
152
|
+
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 (up to 4 images or 1 video)").option("-s, --schedule <datetime>", "Schedule for later (ISO 8601)").option("--json", "Output raw JSON").action(async (text, opts) => {
|
|
153
153
|
const client = getClient();
|
|
154
154
|
let accountId = opts.account;
|
|
155
155
|
if (!accountId) {
|
|
@@ -161,7 +161,7 @@ var postCommand = new Command3("post").description("Create a post on X").argumen
|
|
|
161
161
|
}
|
|
162
162
|
if (active.length > 1) {
|
|
163
163
|
error("Multiple accounts found. Use --account <id> to specify:");
|
|
164
|
-
active.forEach((a) => console.log(` ${a.id} @${a.
|
|
164
|
+
active.forEach((a) => console.log(` ${a.id} @${a.username}`));
|
|
165
165
|
process.exit(1);
|
|
166
166
|
}
|
|
167
167
|
accountId = active[0].id;
|
|
@@ -188,7 +188,7 @@ var postCommand = new Command3("post").description("Create a post on X").argumen
|
|
|
188
188
|
|
|
189
189
|
// src/commands/thread.ts
|
|
190
190
|
import { Command as Command4 } from "commander";
|
|
191
|
-
var threadCommand = new Command4("thread").description("Create a thread
|
|
191
|
+
var threadCommand = new Command4("thread").description("Create a thread").argument("<posts...>", "Thread posts (each argument is one post in the thread)").option("-a, --account <id>", "Account ID").option("-s, --schedule <datetime>", "Schedule for later (ISO 8601)").option("--json", "Output raw JSON").action(async (posts, opts) => {
|
|
192
192
|
const client = getClient();
|
|
193
193
|
let accountId = opts.account;
|
|
194
194
|
if (!accountId) {
|
|
@@ -200,7 +200,7 @@ var threadCommand = new Command4("thread").description("Create a thread on X").a
|
|
|
200
200
|
}
|
|
201
201
|
if (active.length > 1) {
|
|
202
202
|
error("Multiple accounts found. Use --account <id> to specify:");
|
|
203
|
-
active.forEach((a) => console.log(` ${a.id} @${a.
|
|
203
|
+
active.forEach((a) => console.log(` ${a.id} @${a.username}`));
|
|
204
204
|
process.exit(1);
|
|
205
205
|
}
|
|
206
206
|
accountId = active[0].id;
|
|
@@ -266,7 +266,7 @@ postsCommand.command("get <id>").description("Get a post by ID").option("--json"
|
|
|
266
266
|
console.log(`Created: ${post.created_at}`);
|
|
267
267
|
if (post.scheduled_at) console.log(`Scheduled: ${post.scheduled_at}`);
|
|
268
268
|
if (post.published_at) console.log(`Published: ${post.published_at}`);
|
|
269
|
-
if (post.platform_post_id) console.log(`
|
|
269
|
+
if (post.platform_post_id) console.log(`Platform Post ID: ${post.platform_post_id}`);
|
|
270
270
|
}
|
|
271
271
|
} catch (err) {
|
|
272
272
|
error(err instanceof Error ? err.message : "Failed to get post");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chirpie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Chirpie CLI — post to social media from the command line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@chirpie/sdk": "^1.0.
|
|
34
|
+
"@chirpie/sdk": "^1.0.8",
|
|
35
35
|
"commander": "^13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|