@se-studio/contentful-cms 4.14.3 → 4.15.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @se-studio/contentful-cms Changelog
2
2
 
3
+ ## 4.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 93a19f9: cms-edit: a failed checkpoint store now only warns and never refuses a save. The save goes through unchanged, with a clear warning that no checkpoint was stored (so `restore undo` will not cover it). Opening the checkpoint store is skipped when a write touches no existing entries.
8
+
9
+ ## 4.15.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4c1caf1: cms-edit safety and cloning. Every path that changes existing entries (`save`, `batch save`, `batch run` save op, `apply from-json`, `bulk-rtf-replace`, `article-tags-from-json`, `update page-test`) refuses shared entries (`--confirm-shared`, only when the user said earlier in the chat they are changing shared or multiple entries) and HTML component edits (`--allow-html-edit`), and first takes a verified checkpoint; a failed checkpoint blocks the write unless nothing can be lost. `restore undo` plans "undo last save". `create clone --mode deep|shared|hybrid` understands content stacks (shared reuses the stack, deep copies it with its wrapped items, hybrid follows the site's shared-block rule). `create from-json` asks once before linking entries other pages already show (`--allow-shared-links`). The clone-page playbook starts with a full-clone-or-variant gate. `--no-checkpoint` is removed.
14
+
3
15
  ## 4.14.3
4
16
 
5
17
  ### Patch Changes
@@ -17,19 +17,31 @@
17
17
  - Identify source page slug and target slug/title
18
18
  - Read `cms-edit://customer/components-index`
19
19
 
20
+ ## Gate: ask before cloning
21
+
22
+ Ask the user once: **full clone, or change specific components?**
23
+
24
+ - Simple tweak of one existing page (swap a block, change a hero): offer a **page variant** (`create page-variant`, then `add` on the variant). Variants are already supported.
25
+ - Full clone, nothing shared: `--mode deep` (default).
26
+ - Page should follow the original's components: `--mode shared`.
27
+ - Mostly separate, a few blocks shared (footer CTA, forms): `--mode hybrid --share <ids>`.
28
+
29
+ Never link components from another page unless the user chose shared or hybrid. If they said up front they are deliberately changing shared components, do not ask again.
30
+
20
31
  ## Steps
21
32
 
22
- 1. `cms_edit ["open", "--page-slug", "<source-slug>"]`
23
- 2. `cms_edit ["snapshot"]` — note template and component tree
24
- 3. `cms_edit ["list", "--type", "template"]` — confirm template ID
25
- 4. Build `create from-json` payload mirroring structure with new slug/title
26
- 5. `create from-json --dry-run --strict` → create → `save`
27
- 6. Adjust copy/fields on the new page
33
+ 1. `cms_edit ["create", "clone", "--from", "<source-slug>", "--slug", "<new>", "--title", "<t>", "--mode", "<mode>", "--dry-run"]` — show the COPY/LINK table and page counts
34
+ 2. After the user confirms, run it again without `--dry-run` (draft only)
35
+ 3. `cms_edit ["open", "--page-slug", "/<new>"]`, then adjust copy/fields on the new page
36
+ 4. `save` stops on shared entries and HTML component edits; pass `--confirm-shared` only when the user said earlier in the chat that they are changing shared or multiple entries on purpose, and `--allow-html-edit` only after they have seen the HTML diff. On a site with content stacks, shared reuses the stack, deep copies it with its wrapped items, hybrid links it only if named or a pattern shared block
37
+
38
+ Hand-built `create from-json` still works; if it links entries other pages already show, it asks once (`--allow-shared-links` to proceed).
28
39
 
29
40
  ## Confirmation gates
30
41
 
31
- 1. Confirm source page, new slug, and title
32
- 2. `--dry-run --strict` before create
42
+ 1. Full clone or specific components (see gate)
43
+ 2. Confirm source page, new slug, and title
44
+ 3. `--dry-run` before create
33
45
 
34
46
  ## Out of scope
35
47
 
@@ -1,5 +1,5 @@
1
1
  /** SDK `application` value. Becomes `app cms-edit/<version>` in X-Contentful-User-Agent. */
2
- export declare const CMA_APPLICATION = "cms-edit/4.14.3";
2
+ export declare const CMA_APPLICATION = "cms-edit/4.15.1";
3
3
  export declare function cmaClientOptions(accessToken: string): {
4
4
  accessToken: string;
5
5
  application: string;
@@ -1,3 +1,3 @@
1
1
  export declare const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
2
- export declare const CMS_EDIT_VERSION = "4.14.3";
2
+ export declare const CMS_EDIT_VERSION = "4.15.1";
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 = "4.14.3";
3
+ export const CMS_EDIT_VERSION = "4.15.1";
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "4.14.3",
3
+ "version": "4.15.1",
4
4
  "description": "Editor-pack CLI for hosted cms-edit. Content editing runs on the hosted editor, not this package.",
5
5
  "repository": {
6
6
  "type": "git",