chirpie 1.0.5 → 1.0.7

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 +43 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -286,7 +286,7 @@ postsCommand.command("delete <id>").description("Delete a post").action(async (i
286
286
 
287
287
  // src/commands/accounts.ts
288
288
  import { Command as Command6 } from "commander";
289
- var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, and Threads)").option("--json", "Output raw JSON").action(async (opts) => {
289
+ var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, and Facebook)").option("--json", "Output raw JSON").action(async (opts) => {
290
290
  const client = getClient();
291
291
  try {
292
292
  const accounts = await client.listAccounts();
@@ -377,6 +377,48 @@ accountsCommand.command("connect-threads").description("Connect a Threads (Meta)
377
377
  process.exit(1);
378
378
  }
379
379
  });
380
+ accountsCommand.command("connect-mastodon").description("Connect a Mastodon account via OAuth").requiredOption("--instance <url>", "Mastodon instance URL (e.g. https://mastodon.social)").action(async (opts) => {
381
+ const client = getClient();
382
+ try {
383
+ const result = await client.connectMastodonAccount({
384
+ platform: "mastodon",
385
+ instance_url: opts.instance
386
+ });
387
+ info("Open this URL in your browser to connect your Mastodon account:");
388
+ console.log(`
389
+ ${result.authorization_url}
390
+ `);
391
+ } catch (err) {
392
+ error(err instanceof Error ? err.message : "Failed to start Mastodon connection");
393
+ process.exit(1);
394
+ }
395
+ });
396
+ accountsCommand.command("connect-instagram").description("Connect an Instagram account via Instagram Login (OAuth)").action(async () => {
397
+ const client = getClient();
398
+ try {
399
+ const result = await client.connectInstagramAccount();
400
+ info("Open this URL in your browser to connect your Instagram account:");
401
+ console.log(`
402
+ ${result.authorization_url}
403
+ `);
404
+ } catch (err) {
405
+ error(err instanceof Error ? err.message : "Failed to start Instagram connection");
406
+ process.exit(1);
407
+ }
408
+ });
409
+ accountsCommand.command("connect-facebook").description("Connect a Facebook Page via Facebook Login (OAuth)").action(async () => {
410
+ const client = getClient();
411
+ try {
412
+ const result = await client.connectFacebookAccount();
413
+ info("Open this URL in your browser to connect your Facebook Page:");
414
+ console.log(`
415
+ ${result.authorization_url}
416
+ `);
417
+ } catch (err) {
418
+ error(err instanceof Error ? err.message : "Failed to start Facebook connection");
419
+ process.exit(1);
420
+ }
421
+ });
380
422
 
381
423
  // src/commands/analytics.ts
382
424
  import { Command as Command7 } from "commander";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chirpie",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
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.4",
34
+ "@chirpie/sdk": "^1.0.6",
35
35
  "commander": "^13"
36
36
  },
37
37
  "devDependencies": {