@se-studio/contentful-cms 2.8.2 → 3.0.1

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 (103) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +5 -5
  3. package/dist/cli/program.js +2 -2
  4. package/dist/cli/program.js.map +1 -1
  5. package/dist/cli/read-json-input.d.ts +27 -0
  6. package/dist/cli/read-json-input.d.ts.map +1 -0
  7. package/dist/cli/read-json-input.js +65 -0
  8. package/dist/cli/read-json-input.js.map +1 -0
  9. package/dist/cli/runner.js +11 -0
  10. package/dist/cli/runner.js.map +1 -1
  11. package/dist/commands/article-tags-from-json.d.ts.map +1 -1
  12. package/dist/commands/article-tags-from-json.js +12 -11
  13. package/dist/commands/article-tags-from-json.js.map +1 -1
  14. package/dist/commands/asset.d.ts.map +1 -1
  15. package/dist/commands/asset.js +10 -28
  16. package/dist/commands/asset.js.map +1 -1
  17. package/dist/commands/create-from-json.d.ts.map +1 -1
  18. package/dist/commands/create-from-json.js +12 -22
  19. package/dist/commands/create-from-json.js.map +1 -1
  20. package/dist/commands/create-person-from-json.d.ts.map +1 -1
  21. package/dist/commands/create-person-from-json.js +12 -11
  22. package/dist/commands/create-person-from-json.js.map +1 -1
  23. package/dist/commands/create-person.d.ts.map +1 -1
  24. package/dist/commands/create-person.js +28 -8
  25. package/dist/commands/create-person.js.map +1 -1
  26. package/dist/commands/create-taxonomy-from-json.d.ts.map +1 -1
  27. package/dist/commands/create-taxonomy-from-json.js +13 -12
  28. package/dist/commands/create-taxonomy-from-json.js.map +1 -1
  29. package/dist/commands/create-taxonomy.d.ts +2 -1
  30. package/dist/commands/create-taxonomy.d.ts.map +1 -1
  31. package/dist/commands/create-taxonomy.js +17 -15
  32. package/dist/commands/create-taxonomy.js.map +1 -1
  33. package/dist/commands/create.d.ts.map +1 -1
  34. package/dist/commands/create.js +16 -3
  35. package/dist/commands/create.js.map +1 -1
  36. package/dist/commands/preview.d.ts.map +1 -1
  37. package/dist/commands/preview.js +35 -0
  38. package/dist/commands/preview.js.map +1 -1
  39. package/dist/commands/rtf.d.ts.map +1 -1
  40. package/dist/commands/rtf.js +23 -30
  41. package/dist/commands/rtf.js.map +1 -1
  42. package/dist/commands/run.d.ts.map +1 -1
  43. package/dist/commands/run.js +13 -20
  44. package/dist/commands/run.js.map +1 -1
  45. package/dist/commands/save.d.ts.map +1 -1
  46. package/dist/commands/save.js +2 -4
  47. package/dist/commands/save.js.map +1 -1
  48. package/dist/commands/set.d.ts +1 -0
  49. package/dist/commands/set.d.ts.map +1 -1
  50. package/dist/commands/set.js +68 -44
  51. package/dist/commands/set.js.map +1 -1
  52. package/dist/config/hosted.d.ts.map +1 -1
  53. package/dist/config/hosted.js +1 -0
  54. package/dist/config/hosted.js.map +1 -1
  55. package/dist/contentful/entry-fields.js +2 -2
  56. package/dist/contentful/entry-fields.js.map +1 -1
  57. package/dist/contentful/person-create.d.ts +2 -1
  58. package/dist/contentful/person-create.d.ts.map +1 -1
  59. package/dist/contentful/person-create.js +1 -10
  60. package/dist/contentful/person-create.js.map +1 -1
  61. package/dist/contentful/set-field-schema.d.ts +1 -1
  62. package/dist/contentful/set-field-schema.js +2 -2
  63. package/dist/contentful/set-field-schema.js.map +1 -1
  64. package/dist/generated/version.d.ts +1 -1
  65. package/dist/generated/version.js +1 -1
  66. package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
  67. package/dist/mcp/prompts/onboarding.js +10 -10
  68. package/dist/mcp/prompts/onboarding.js.map +1 -1
  69. package/dist/mcp/tools/cms-edit.d.ts +1 -1
  70. package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
  71. package/dist/mcp/tools/cms-edit.js +6 -2
  72. package/dist/mcp/tools/cms-edit.js.map +1 -1
  73. package/dist/output/mode.js +1 -1
  74. package/dist/rtf/resolveRtfInput.d.ts +3 -3
  75. package/dist/rtf/resolveRtfInput.d.ts.map +1 -1
  76. package/dist/rtf/resolveRtfInput.js +5 -16
  77. package/dist/rtf/resolveRtfInput.js.map +1 -1
  78. package/dist/session/log.d.ts.map +1 -1
  79. package/dist/session/log.js +3 -1
  80. package/dist/session/log.js.map +1 -1
  81. package/docs/FUNCTIONAL_SPEC.md +1 -1
  82. package/docs/editor-tasks/article-tags.md +2 -2
  83. package/docs/editor-tasks/authors-import.md +2 -2
  84. package/docs/editor-tasks/create-article.md +1 -1
  85. package/docs/editor-tasks/create-from-document.md +1 -1
  86. package/docs/editor-tasks/create-page.md +5 -1
  87. package/docs/editor-tasks/featured-images.md +1 -1
  88. package/docs/editor-tasks/media-reuse-and-upload.md +1 -1
  89. package/docs/editor-tasks/media-review.md +2 -2
  90. package/docs/editor-tasks/preview-verify.md +1 -1
  91. package/docs/editor-tasks/taxonomy.md +1 -1
  92. package/docs/help/article-tags-from-json.md +2 -2
  93. package/docs/help/asset-review.md +3 -3
  94. package/docs/help/batch-run.md +6 -6
  95. package/docs/help/create-from-json.md +11 -11
  96. package/docs/help/fields-component.md +1 -1
  97. package/docs/help/fields-taxonomy.md +1 -1
  98. package/docs/help/index.md +8 -8
  99. package/docs/help/person-from-json.md +2 -2
  100. package/docs/help/taxonomy-from-json.md +5 -5
  101. package/docs/help/workflow.md +1 -1
  102. package/package.json +1 -1
  103. package/skills/core/SKILL.md +10 -10
@@ -3,8 +3,8 @@
3
3
  `create person-from-json` creates multiple `person` entries from a single JSON file. Use it for spreadsheet-to-CMS author imports and team directory bootstraps.
4
4
 
5
5
  ```bash
6
- cms-edit create person-from-json --file authors.json --dry-run
7
- cms-edit create person-from-json --file authors.json --if-not-exists
6
+ cms-edit create person-from-json --json '{...}' --dry-run
7
+ cms-edit create person-from-json --json '{...}' --if-not-exists
8
8
  ```
9
9
 
10
10
  All entries are created as **drafts**. Nothing is published automatically.
@@ -3,8 +3,8 @@
3
3
  `create taxonomy-from-json` creates multiple `tagType`, `articleType`, and `tag` entries from a single JSON file. It is the recommended way to bootstrap taxonomy for import scripts and publication workflows.
4
4
 
5
5
  ```bash
6
- cms-edit create taxonomy-from-json --file taxonomy.json --dry-run
7
- cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
6
+ cms-edit create taxonomy-from-json --json '{...}' --dry-run
7
+ cms-edit create taxonomy-from-json --json '{...}' --if-not-exists
8
8
  ```
9
9
 
10
10
  Processing order: **tagTypes → articleTypes → tags** (tags depend on tagTypes).
@@ -65,7 +65,7 @@ Top-level link shorthands (`templateId`, `featuredImageId`, `topContentIds`, etc
65
65
 
66
66
  | Option | Description |
67
67
  |---|---|
68
- | `--file <path>` | Path to taxonomy JSON (required) |
68
+ | `--json <json> or --json-base64 <encoded>` | Path to taxonomy JSON (required) |
69
69
  | `--if-not-exists` | Skip creation when slug already exists; return existing ID |
70
70
  | `--dry-run` | Validate all entries and link targets without writing |
71
71
 
@@ -73,7 +73,7 @@ Top-level link shorthands (`templateId`, `featuredImageId`, `topContentIds`, etc
73
73
 
74
74
  ## Output
75
75
 
76
- Human mode prints a summary per entry. JSON mode (`CMS_EDIT_JSON=1` or `--json`):
76
+ Human mode prints a summary per entry. JSON mode (`CMS_EDIT_JSON=1` or `--json-output`):
77
77
 
78
78
  ```json
79
79
  {
@@ -92,7 +92,7 @@ Combine batch bootstrap with `create … --if-not-exists` and `resolve` for scri
92
92
 
93
93
  ```bash
94
94
  # One-time taxonomy bootstrap
95
- cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
95
+ cms-edit create taxonomy-from-json --json '{...}' --if-not-exists
96
96
 
97
97
  # Look up IDs in scripts
98
98
  cms-edit resolve --tag-type-slug presentation-type --json
@@ -78,7 +78,7 @@ cms-edit set @c2 backgroundColour "Navy"
78
78
  cms-edit rtf @c2 body "## Overview\n\nFirst paragraph.\n\nSecond paragraph."
79
79
 
80
80
  # From a file (long content)
81
- cms-edit rtf @c2 body --file content/body.md
81
+ cms-edit rtf @c2 body --content "# ..."
82
82
  ```
83
83
 
84
84
  ### Multi-value: replacing inline content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "2.8.2",
3
+ "version": "3.0.1",
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",
@@ -120,7 +120,7 @@ cms-edit set @c0 anchor "hero-section"
120
120
  cms-edit set @c1:cmsLabel="Hero — School avoidance" @c2:cmsLabel="What is school avoidance?" @c3:cmsLabel="Signs of school avoidance"
121
121
  cms-edit set @c1:heading="Title A" @c2:heading="Title B"
122
122
  ```
123
- Each token is `@ref:fieldName=value`. All values are scalar (string, boolean, number). Flags like `--link`, `--links`, `--file` do not apply in multi mode.
123
+ Each token is `@ref:fieldName=value`. All values are scalar (string, boolean, number). Flags like `--link`, `--links`, `--json` do not apply in multi mode.
124
124
 
125
125
  **Entry link fields** (template, articleType, etc. — value is the linked entry ID):
126
126
  ```bash
@@ -158,7 +158,7 @@ For any content with multiple paragraphs or newlines, use `printf` piped to stdi
158
158
  printf '## Why it matters\n\nOur platform helps teams **move faster**.\n\n- Instant setup\n- No code required\n' | cms-edit rtf @c1 body --markdown -
159
159
 
160
160
  # Also correct — file input
161
- cms-edit rtf @c1 body --markdown --file path/to/file.md
161
+ cms-edit rtf @c1 body --markdown --content "# Heading\n\nBody."
162
162
  cms-edit rtf @c1 body --markdown - < path/to/file.md
163
163
  ```
164
164
 
@@ -170,7 +170,7 @@ cms-edit rtf @c1 body --markdown "Simple single-paragraph body text with **bold*
170
170
 
171
171
  **Surgical rich text replace** (compliance / quidget tokens — does not re-import the whole field):
172
172
 
173
- - Matching is **per Contentful text node** only. If the author split a phrase with bold (e.g. `**Annual fee: **$95`), the string `Annual fee: $95` will **not** match as one piece; use a shorter `--find` or full `rtf … --file`.
173
+ - Matching is **per Contentful text node** only. If the author split a phrase with bold (e.g. `**Annual fee: **$95`), the string `Annual fee: $95` will **not** match as one piece; use a shorter `--find` or full `rtf … --content`.
174
174
  - Quidget strings contain `*`, which Markdown would treat as italic — use **`--replace-plain`**, not `--replace`.
175
175
 
176
176
  ```bash
@@ -246,7 +246,7 @@ Same as Component plus:
246
246
  When adding body content and a CTA (e.g. PDF download) to an article:
247
247
 
248
248
  1. `cms-edit open --article-slug <slug>` (or `open --id <id>`)
249
- 2. Set body: `cms-edit rtf @<ref> body --markdown "..."` or `--markdown --file path/to.md`. If you need to add a body component first, use `add` then `rtf`.
249
+ 2. Set body: `cms-edit rtf @<ref> body --markdown "..."` or `--content` / `--base64`. If you need to add a body component first, use `add` then `rtf`.
250
250
  3. `cms-edit add CTA --target bottomContent`
251
251
  4. Set CTA links: use `--type external --label "Download PDF" --href <url>` for an external PDF URL, or `--type download --label "Download PDF" --asset-id <asset-id>` for a Contentful asset (get the ID from `cms-edit asset search "..."` or `asset info <id>`).
252
252
  5. `cms-edit save`
@@ -430,10 +430,10 @@ cms-edit create tag --slug easl-congress-2026 --name "EASL Congress 2026" --tag-
430
430
  --description "Research presented at EASL Congress 2026." --featured-image <logoAssetId>
431
431
 
432
432
  # Full fields via JSON
433
- cms-edit create tag --json-file tag.json --tag-type presentation-type --if-not-exists
433
+ cms-edit create tag --json '{"slug":"presentation"}' --tag-type presentation-type --if-not-exists
434
434
 
435
435
  # Batch bootstrap
436
- cms-edit create taxonomy-from-json --file taxonomy.json --if-not-exists
436
+ cms-edit create taxonomy-from-json --json '{"tagTypes":[...]}' --if-not-exists
437
437
 
438
438
  # Idempotent single-entry creates
439
439
  cms-edit create tag-type --slug conference-venue --name "Conference Venue" --if-not-exists
@@ -664,9 +664,9 @@ cms-edit peek --id <entryId> # Look up by entry ID
664
664
  Run a sequence of operations from a JSON file or stdin.
665
665
 
666
666
  ```bash
667
- cms-edit batch run --file ops.json # Run batch ops from file
667
+ cms-edit batch run --json '[...]' # Run batch ops from inline JSON
668
668
  echo '[...]' | cms-edit batch run # Pipe from stdin
669
- cms-edit batch run --file ops.json --dry-run # Validate without saving
669
+ cms-edit batch run --json '[...]' --dry-run # Validate without saving
670
670
  ```
671
671
 
672
672
  Supported ops: `open`, `set`, `rtf`, `rtf-replace`, `save`, `add`, `links-add`.
@@ -700,8 +700,8 @@ Example `ops.json` — update an existing page with a new CTA that has two butto
700
700
  Create a complete page or article — including all components, fields, and CTA links — from a single declarative JSON file. This is the recommended approach for creating multiple pages or articles in bulk.
701
701
 
702
702
  ```bash
703
- cms-edit create from-json --file page.json # Create from file
704
- cms-edit create from-json --file page.json --dry-run # Preview without writing
703
+ cms-edit create from-json --json '{...}' # Create from inline JSON
704
+ cms-edit create from-json --json '{...}' --dry-run # Preview without writing
705
705
  cat page.json | cms-edit create from-json # Pipe from stdin
706
706
  ```
707
707