@se-studio/contentful-cms 2.8.1 → 3.0.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 (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cli/read-json-input.d.ts +27 -0
  3. package/dist/cli/read-json-input.d.ts.map +1 -0
  4. package/dist/cli/read-json-input.js +65 -0
  5. package/dist/cli/read-json-input.js.map +1 -0
  6. package/dist/commands/article-tags-from-json.d.ts.map +1 -1
  7. package/dist/commands/article-tags-from-json.js +12 -11
  8. package/dist/commands/article-tags-from-json.js.map +1 -1
  9. package/dist/commands/asset.d.ts.map +1 -1
  10. package/dist/commands/asset.js +9 -27
  11. package/dist/commands/asset.js.map +1 -1
  12. package/dist/commands/create-from-json.d.ts.map +1 -1
  13. package/dist/commands/create-from-json.js +12 -22
  14. package/dist/commands/create-from-json.js.map +1 -1
  15. package/dist/commands/create-person-from-json.d.ts.map +1 -1
  16. package/dist/commands/create-person-from-json.js +12 -11
  17. package/dist/commands/create-person-from-json.js.map +1 -1
  18. package/dist/commands/create-person.d.ts.map +1 -1
  19. package/dist/commands/create-person.js +28 -8
  20. package/dist/commands/create-person.js.map +1 -1
  21. package/dist/commands/create-taxonomy-from-json.d.ts.map +1 -1
  22. package/dist/commands/create-taxonomy-from-json.js +13 -12
  23. package/dist/commands/create-taxonomy-from-json.js.map +1 -1
  24. package/dist/commands/create-taxonomy.d.ts +2 -1
  25. package/dist/commands/create-taxonomy.d.ts.map +1 -1
  26. package/dist/commands/create-taxonomy.js +17 -15
  27. package/dist/commands/create-taxonomy.js.map +1 -1
  28. package/dist/commands/create.d.ts.map +1 -1
  29. package/dist/commands/create.js +16 -3
  30. package/dist/commands/create.js.map +1 -1
  31. package/dist/commands/preview.d.ts.map +1 -1
  32. package/dist/commands/preview.js +35 -0
  33. package/dist/commands/preview.js.map +1 -1
  34. package/dist/commands/rtf.d.ts.map +1 -1
  35. package/dist/commands/rtf.js +23 -30
  36. package/dist/commands/rtf.js.map +1 -1
  37. package/dist/commands/run.d.ts.map +1 -1
  38. package/dist/commands/run.js +13 -20
  39. package/dist/commands/run.js.map +1 -1
  40. package/dist/commands/save.d.ts.map +1 -1
  41. package/dist/commands/save.js +2 -4
  42. package/dist/commands/save.js.map +1 -1
  43. package/dist/commands/set.d.ts +1 -0
  44. package/dist/commands/set.d.ts.map +1 -1
  45. package/dist/commands/set.js +68 -44
  46. package/dist/commands/set.js.map +1 -1
  47. package/dist/config/hosted.d.ts.map +1 -1
  48. package/dist/config/hosted.js +1 -0
  49. package/dist/config/hosted.js.map +1 -1
  50. package/dist/contentful/entry-fields.d.ts.map +1 -1
  51. package/dist/contentful/entry-fields.js +0 -3
  52. package/dist/contentful/entry-fields.js.map +1 -1
  53. package/dist/contentful/person-create.d.ts +2 -1
  54. package/dist/contentful/person-create.d.ts.map +1 -1
  55. package/dist/contentful/person-create.js +1 -10
  56. package/dist/contentful/person-create.js.map +1 -1
  57. package/dist/contentful/set-field-schema.d.ts +1 -1
  58. package/dist/contentful/set-field-schema.js +2 -2
  59. package/dist/contentful/set-field-schema.js.map +1 -1
  60. package/dist/generated/version.d.ts +1 -1
  61. package/dist/generated/version.js +1 -1
  62. package/dist/mcp/prompts/onboarding.d.ts.map +1 -1
  63. package/dist/mcp/prompts/onboarding.js +10 -10
  64. package/dist/mcp/prompts/onboarding.js.map +1 -1
  65. package/dist/mcp/tools/cms-edit.d.ts +1 -1
  66. package/dist/mcp/tools/cms-edit.d.ts.map +1 -1
  67. package/dist/mcp/tools/cms-edit.js +6 -2
  68. package/dist/mcp/tools/cms-edit.js.map +1 -1
  69. package/dist/rtf/resolveRtfInput.d.ts +3 -3
  70. package/dist/rtf/resolveRtfInput.d.ts.map +1 -1
  71. package/dist/rtf/resolveRtfInput.js +5 -16
  72. package/dist/rtf/resolveRtfInput.js.map +1 -1
  73. package/docs/editor-tasks/article-tags.md +2 -2
  74. package/docs/editor-tasks/authors-import.md +2 -2
  75. package/docs/editor-tasks/create-article.md +1 -1
  76. package/docs/editor-tasks/create-from-document.md +1 -1
  77. package/docs/editor-tasks/create-page.md +5 -1
  78. package/docs/editor-tasks/featured-images.md +1 -1
  79. package/docs/editor-tasks/media-reuse-and-upload.md +1 -1
  80. package/docs/editor-tasks/preview-verify.md +1 -1
  81. package/docs/editor-tasks/taxonomy.md +1 -1
  82. package/docs/help/article-tags-from-json.md +2 -2
  83. package/docs/help/batch-run.md +6 -6
  84. package/docs/help/create-from-json.md +11 -11
  85. package/docs/help/fields-component.md +1 -1
  86. package/docs/help/index.md +8 -8
  87. package/docs/help/person-from-json.md +2 -2
  88. package/docs/help/taxonomy-from-json.md +4 -4
  89. package/docs/help/workflow.md +1 -1
  90. package/package.json +1 -1
  91. package/skills/core/SKILL.md +10 -10
@@ -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