@anaella/cli 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +7 -2
  2. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -112,7 +112,12 @@ function cmdPost(client, o) {
112
112
  when: o.when,
113
113
  media: (o.media ?? []).map((url) => ({ url })),
114
114
  type: o.type,
115
- firstComment: o.firstComment
115
+ firstComment: o.firstComment,
116
+ title: o.title,
117
+ markdown: o.markdown,
118
+ excerpt: o.excerpt,
119
+ tags: o.tag?.length ? o.tag : void 0,
120
+ canonicalUrl: o.canonicalUrl
116
121
  });
117
122
  }
118
123
  var cmdPosts = (client, o) => client.listPosts({
@@ -297,7 +302,7 @@ program.command("logout").description("Remove the saved API key").action(() => {
297
302
  program.command("channels").description("List connected channels").action(
298
303
  (_opts, command) => withClient(command, (c) => cmdChannels(c), ["id", "platform", "name", "active"])
299
304
  );
300
- program.command("post").description("Create/schedule/publish a post").requiredOption("-c, --channel <id>", "channel id (repeatable)", collect, []).option("-t, --text <text>", "post text").option("-w, --when <when>", '"now" | "draft" | ISO-8601', "draft").option("-m, --media <url>", "public media URL (repeatable)", collect, []).option("--type <type>", "post | reel | thread | story").option("--first-comment <text>", "first comment").action((opts, command) => withClient(command, (c) => cmdPost(c, opts)));
305
+ program.command("post").description("Create/schedule/publish a post").requiredOption("-c, --channel <id>", "channel id (repeatable)", collect, []).option("-t, --text <text>", "post text").option("-w, --when <when>", '"now" | "draft" | ISO-8601', "draft").option("-m, --media <url>", "public media URL (repeatable)", collect, []).option("--type <type>", "post | reel | thread | story | article").option("--first-comment <text>", "first comment").option("--title <title>", "article title (--type article)").option("--markdown <md>", 'article body in Markdown, e.g. "$(cat post.md)" (--type article)').option("--excerpt <text>", "article excerpt (--type article)").option("--tag <tag>", "article tag (repeatable, --type article)", collect, []).option("--canonical-url <url>", "article canonical URL (--type article)").action((opts, command) => withClient(command, (c) => cmdPost(c, opts)));
301
306
  program.command("posts").description("List recent posts").option("--limit <n>", "max results (1-100)").option("--cursor <n>", "offset").action(
302
307
  (opts, command) => withClient(command, (c) => cmdPosts(c, opts), ["id", "type", "status", "scheduledAt"])
303
308
  );
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@anaella/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Command-line tool for anaella.com — schedule and publish social posts.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "anaella": "dist/index.js"
8
8
  },
9
- "files": ["dist"],
9
+ "files": [
10
+ "dist"
11
+ ],
10
12
  "publishConfig": {
11
13
  "access": "public"
12
14
  },
@@ -16,7 +18,7 @@
16
18
  "test": "bun test"
17
19
  },
18
20
  "dependencies": {
19
- "@anaella/client": "^0.1.7",
21
+ "@anaella/client": "^0.1.8",
20
22
  "commander": "^12.0.0"
21
23
  },
22
24
  "devDependencies": {