@se-studio/contentful-cms 1.3.6 → 1.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/HOSTED.md +21 -0
  3. package/dist/commands/entry-search.d.ts.map +1 -1
  4. package/dist/commands/entry-search.js +4 -1
  5. package/dist/commands/entry-search.js.map +1 -1
  6. package/dist/commands/list.d.ts.map +1 -1
  7. package/dist/commands/list.js +26 -2
  8. package/dist/commands/list.js.map +1 -1
  9. package/dist/commands/sitemap.d.ts.map +1 -1
  10. package/dist/commands/sitemap.js +17 -2
  11. package/dist/commands/sitemap.js.map +1 -1
  12. package/dist/contentful/cda-sync.d.ts.map +1 -1
  13. package/dist/contentful/cda-sync.js +2 -0
  14. package/dist/contentful/cda-sync.js.map +1 -1
  15. package/dist/contentful/reference-record.d.ts +4 -0
  16. package/dist/contentful/reference-record.d.ts.map +1 -1
  17. package/dist/contentful/reference-record.js +7 -0
  18. package/dist/contentful/reference-record.js.map +1 -1
  19. package/dist/generated/hosted-guide.d.ts +1 -1
  20. package/dist/generated/hosted-guide.d.ts.map +1 -1
  21. package/dist/generated/hosted-guide.js +1 -1
  22. package/dist/generated/hosted-guide.js.map +1 -1
  23. package/dist/generated/version.d.ts +1 -1
  24. package/dist/generated/version.js +1 -1
  25. package/dist/index/db.d.ts.map +1 -1
  26. package/dist/index/db.js +5 -1
  27. package/dist/index/db.js.map +1 -1
  28. package/dist/index/query.d.ts +4 -0
  29. package/dist/index/query.d.ts.map +1 -1
  30. package/dist/index/query.js +13 -2
  31. package/dist/index/query.js.map +1 -1
  32. package/dist/index/reference-lookup.d.ts.map +1 -1
  33. package/dist/index/reference-lookup.js +4 -0
  34. package/dist/index/reference-lookup.js.map +1 -1
  35. package/dist/index/schema.d.ts +5 -3
  36. package/dist/index/schema.d.ts.map +1 -1
  37. package/dist/index/schema.js +8 -3
  38. package/dist/index/schema.js.map +1 -1
  39. package/dist/index/sync.d.ts.map +1 -1
  40. package/dist/index/sync.js +5 -4
  41. package/dist/index/sync.js.map +1 -1
  42. package/dist/mcp/tools/cms-edit.d.ts +1 -1
  43. package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
  44. package/dist/mcp/tools/cms-edit.js +8 -0
  45. package/dist/mcp/tools/cms-edit.js.map +1 -1
  46. package/dist/output/json.d.ts.map +1 -1
  47. package/dist/output/json.js +1 -0
  48. package/dist/output/json.js.map +1 -1
  49. package/docs/help/fields-article.md +14 -0
  50. package/docs/help/index-sync.md +1 -0
  51. package/docs/mcp/hosted-guide.md +24 -0
  52. package/package.json +1 -1
  53. package/skills/core/SKILL.md +7 -0
@@ -31,6 +31,20 @@ This lists all article type entries with their IDs and slugs. Use the `sys.id` v
31
31
 
32
32
  ---
33
33
 
34
+ ## Listing Recent Articles
35
+
36
+ Sort by publication `date` (matches the website), not `sys.updatedAt`:
37
+
38
+ ```bash
39
+ cms-edit list --type article --sort date -n 10
40
+ cms-edit search "keyword" --type article
41
+ cms-edit sitemap --include article --sort date
42
+ ```
43
+
44
+ To find **draft** articles: `cms-edit sitemap --include article --status draft`, then `cms-edit peek --article-slug <slug>` or `cms-edit open --id <id>`. `peek` and `open` load draft content — only `list --published` is published-only.
45
+
46
+ ---
47
+
34
48
  ## Reading Article Fields
35
49
 
36
50
  ```bash
@@ -23,6 +23,7 @@ Each catalog row stores:
23
23
  | `cmsLabel` | `cmsLabel` when present (page, article, pageVariant, tag, template) |
24
24
  | `tagTypeSlug` | Parent tag type slug (tags only) |
25
25
  | `articleTypeSlug` | Parent article type slug (articles only) |
26
+ | `date` | Publication date `YYYY-MM-DD` (articles only; schema v4) |
26
27
 
27
28
  ## When you need it
28
29
 
@@ -183,6 +183,30 @@ Asset search and media-by-filename list **require** the index. Template/taxonomy
183
183
  | **Wrong space** | Token must belong to this deployment's Contentful space |
184
184
  | **Check version** | Call `cms_edit_version` or `curl /api/health` and read `cmsEdit` |
185
185
 
186
+ ## Articles
187
+
188
+ **Recent articles** (by publication `date`, not last-updated):
189
+
190
+ ```json
191
+ ["list", "--type", "article", "--sort", "date", "-n", "10"]
192
+ ```
193
+
194
+ Alternatives: `["search", "<keyword>", "--type", "article"]` (also sorts by date), `["sitemap", "--include", "article", "--sort", "date"]`.
195
+
196
+ **Draft articles** — `peek` and `open` load drafts via CMA (not published-only). To discover drafts:
197
+
198
+ ```json
199
+ ["sitemap", "--include", "article", "--status", "draft"]
200
+ ["search", "<title>", "--type", "article"]
201
+ ["list", "--type", "article", "--slug", "<slug>"]
202
+ ```
203
+
204
+ Then open: `["peek", "--article-slug", "<slug>"]` or `["open", "--id", "<entry-id>"]`. Use `--article-slug`, not `--page-slug`.
205
+
206
+ **Published-only** is opt-in: `list --published` and `resolve --published` use the Delivery API index and omit never-published drafts.
207
+
208
+ After upgrading cms-edit, run `["index", "sync"]` once so the local index includes article `date` values (schema v4).
209
+
186
210
  ## Command reference (cms_edit args)
187
211
 
188
212
  **Discovery:** `sitemap`, `list --type <type>`, `search <query>`, `schema <contentType>`, `index sync`, `index status`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "1.3.6",
3
+ "version": "1.4.0",
4
4
  "description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -479,10 +479,16 @@ cms-edit types component
479
479
  cms-edit types collection
480
480
 
481
481
  # List entries with filters
482
+ cms-edit list --type article --sort date -n 10 # recent articles by publication date
482
483
  cms-edit list --type article --has-download # articles with a download asset
483
484
  cms-edit list --type article --slug my-article # article with a specific slug
484
485
  cms-edit list --type article --has-field tags # articles where tags field is non-empty
485
486
 
487
+ # Find draft articles, then peek/open (both support drafts via CMA)
488
+ cms-edit sitemap --include article --status draft
489
+ cms-edit peek --article-slug resources/blog/my-post
490
+ # Only list --published / resolve --published are published-only
491
+
486
492
  # Resolve any entry or asset by ID (no open session required)
487
493
  cms-edit resolve --id 4xKj2abcDefGhijK # entry: shows type, title, slug, status
488
494
  cms-edit resolve --id 7pQrStuvWxyzAbc # asset: shows title, fileName, URL
@@ -702,6 +708,7 @@ cms-edit sitemap # All pages, sorted by slug
702
708
  cms-edit sitemap --prefix /blog # Filter by slug prefix
703
709
  cms-edit sitemap --status draft # Draft pages only
704
710
  cms-edit sitemap --sort updated # Most recently updated first
711
+ cms-edit sitemap --include article --sort date # Articles by publication date
705
712
  cms-edit sitemap --tree # Tree rendering
706
713
  cms-edit sitemap --include page,article # Include articles too
707
714
  ```