@se-studio/contentful-cms 3.1.3 → 3.1.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/contentful-cms Changelog
2
2
 
3
+ ## 3.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Clarify Media entry reuse for `visuals` in task-media-reuse-and-upload (avoid duplicate wrappers on shared composites).
8
+
3
9
  ## 3.1.3
4
10
 
5
11
  ### Patch Changes
@@ -1,3 +1,3 @@
1
1
  export declare const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
2
- export declare const CMS_EDIT_VERSION = "3.1.3";
2
+ export declare const CMS_EDIT_VERSION = "3.1.4";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/generate-embedded-assets.mjs — do not edit manually.
2
2
  export const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
3
- export const CMS_EDIT_VERSION = "3.1.3";
3
+ export const CMS_EDIT_VERSION = "3.1.4";
4
4
  //# sourceMappingURL=version.js.map
@@ -23,7 +23,8 @@
23
23
  - `cms_edit ["asset", "search", "--filename-match", "<partial-name>"]`
24
24
  - `cms_edit ["list", "--type", "media", "--asset-filename-match", "<partial>"]`
25
25
  3. If match found — link by asset ID or filename in `set` / `create from-json` (`featuredImageAssetFilename`, `visualAssetFilename`, etc.)
26
- 4. Or `cms_edit ["create", "media", "--asset-id", "<id>", "--name", "…"]` for RTF embeds
26
+ 4. For **`visuals`** (Media entry array): prefer an **existing Media entry** — `cms_edit ["list", "--type", "media", "--asset-id", "<assetId>"]` — then `set @root visuals <mediaEntryId> --links`. Do **not** `create media` or use `asset upload --with-media` when a wrapper already exists.
27
+ 5. `create media` only when no Media entry wraps that asset (RTF embeds, or first article in a new composite batch — then **reuse that media ID** on sibling entries)
27
28
 
28
29
  ## Upload only when no match
29
30
 
@@ -43,12 +44,15 @@ Rules:
43
44
  - Upload alone does **not** attach the asset — follow with **link + save** (below)
44
45
  - Use `--if-exists-by-filename` (with `--file-name`) to avoid duplicate assets when re-running
45
46
 
46
- Optional Media wrapper after staged upload (RTF embeds, not person `media`):
47
+ After staged upload, create a Media wrapper **only when none exists** for that asset:
47
48
 
48
49
  ```
49
- cms_edit ["asset", "upload", "--staged", "<uploadId>", "--mime", "image/png", "--file-name", "figure.png", "--with-media", "--media-name", "Figure 1"]
50
+ cms_edit ["list", "--type", "media", "--asset-id", "<newPortraitAssetId>"]
51
+ cms_edit ["create", "media", "--asset-id", "<newPortraitAssetId>", "--name", "…"]
50
52
  ```
51
53
 
54
+ Avoid `asset upload --with-media` when multiple entries will share the same image (e.g. news composites) — it creates duplicate Media entries. Upload the asset only, then one shared `create media`, then link the media ID on each entry.
55
+
52
56
  **Last resort `--url`** only when the file is already on public HTTPS and staged upload is impractical:
53
57
 
54
58
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
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",