@hintoai/cli 0.3.5 → 0.4.0

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.
@@ -62,6 +62,7 @@ export declare const articlesApi: (client: AxiosInstance) => {
62
62
  update: (id: string, body: {
63
63
  title?: string;
64
64
  slug?: string;
65
+ content?: string;
65
66
  metaDescription?: string;
66
67
  metaKeywords?: string[];
67
68
  }) => Promise<ArticleDetail>;
@@ -110,18 +110,24 @@ function registerArticles(program, client) {
110
110
  .description('Update an article')
111
111
  .option('--title <title>', 'New title')
112
112
  .option('--slug <slug>', 'New slug')
113
+ .option('--content <content>', 'New Markdown content (string or @filepath) — replaces the body')
113
114
  .option('--meta-description <text>', 'SEO meta description')
114
115
  .option('--meta-keywords <keywords>', 'Comma-separated SEO keywords')
115
116
  .option('--json', 'Output as JSON')
116
117
  .action(async (id, opts) => {
117
118
  try {
118
- if (!opts.title && !opts.slug && !opts.metaDescription && !opts.metaKeywords) {
119
- (0, errors_1.exitWithError)('Provide at least one field to update: --title, --slug, --meta-description, or --meta-keywords');
119
+ if (!opts.title &&
120
+ !opts.slug &&
121
+ !opts.content &&
122
+ !opts.metaDescription &&
123
+ !opts.metaKeywords) {
124
+ (0, errors_1.exitWithError)('Provide at least one field to update: --title, --slug, --content, --meta-description, or --meta-keywords');
120
125
  return;
121
126
  }
122
127
  const data = await api.update(id, {
123
128
  ...(opts.title !== undefined && { title: opts.title }),
124
129
  ...(opts.slug !== undefined && { slug: opts.slug }),
130
+ ...(opts.content !== undefined && { content: resolveContent(opts.content) }),
125
131
  ...(opts.metaDescription !== undefined && { metaDescription: opts.metaDescription }),
126
132
  ...(opts.metaKeywords !== undefined && {
127
133
  metaKeywords: opts.metaKeywords
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hintoai/cli",
3
- "version": "0.3.5",
3
+ "version": "0.4.0",
4
4
  "description": "Hinto AI CLI — manage videos, articles, and publishing via the Hinto API",
5
5
  "main": "dist/index.js",
6
6
  "bin": {