@sensinum/strapi-plugin-xecp 5.0.2 → 5.1.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.
- package/README.md +19 -16
- package/dist/admin/{App-COKB0PXI.mjs → App-DnN-IvA2.mjs} +508 -519
- package/dist/admin/App-fzbS9IJs.js +30 -0
- package/dist/admin/TruncatedTypography-BIh1V9g2.mjs +49 -0
- package/dist/admin/TruncatedTypography-IG2-4h8c.js +12 -0
- package/dist/admin/{de-Bc7t3sCO.mjs → de-CXusi8Qg.mjs} +4 -1
- package/dist/admin/{de-B5M8juGn.js → de-DB2gq7qr.js} +1 -1
- package/dist/admin/{en-DXWBDgkB.js → en-BuzP59R9.js} +1 -1
- package/dist/admin/{en-16Qqparh.mjs → en-Dw6HZo7C.mjs} +4 -1
- package/dist/admin/{fr-CMzm8jIl.mjs → fr-CyBDGDh1.mjs} +4 -1
- package/dist/admin/{fr-CPWgcURq.js → fr-ISZXcmX2.js} +1 -1
- package/dist/admin/index-BPA-rtqa.js +1 -0
- package/dist/admin/{index-Bgk0cBQK.mjs → index-CUUBtl-O.mjs} +5 -5
- package/dist/admin/{index-ogQgaRcB.js → index-CzhrALSL.js} +1 -1
- package/dist/admin/index-DDj2bCYO.mjs +653 -0
- package/dist/admin/{index-BNa83Wfu.js → index-DGBlS60G.js} +1 -1
- package/dist/admin/{index-DQgqKBmR.mjs → index-Dr164lAs.mjs} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/{pl-Blw4wk9g.js → pl-Ds5SR76s.js} +1 -1
- package/dist/admin/{pl-CuTaHdsS.mjs → pl-mwGoOpdR.mjs} +4 -1
- package/dist/server/index.js +7 -10
- package/dist/server/index.mjs +7873 -7787
- package/package.json +1 -1
- package/dist/admin/App-CxQAwCC4.js +0 -30
- package/dist/admin/TruncatedTypography-72wp11m4.js +0 -12
- package/dist/admin/TruncatedTypography-Df3hMZdB.mjs +0 -34
- package/dist/admin/index-BnS-25UL.mjs +0 -610
- package/dist/admin/index-C0CxNaV6.js +0 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ This plugin brings Cross Environment Content Promotion (XECP) to Strapi: move se
|
|
|
43
43
|
- **Selective Content Promotion**: Choose exactly what moves to the target.
|
|
44
44
|
- **Sync Job Control**: Start, monitor, cancel, and resume snapshot syncs (extra requests queue while one is running).
|
|
45
45
|
- **Configurable Scope**: Include or exclude content types from the promotion graph.
|
|
46
|
-
- **Media-Aware Promotion**:
|
|
46
|
+
- **Media-Aware Promotion**: Copy Media Library files when include media is on (media fields, Blocks images, and Markdown file links).
|
|
47
47
|
|
|
48
48
|
## 🎨 Admin Panel Features
|
|
49
49
|
|
|
@@ -61,7 +61,7 @@ Entity comparison requires a local snapshot of the target. XECP syncs target ent
|
|
|
61
61
|
|
|
62
62
|
Snapshot syncs use a **shared queue**: only one sync job runs at a time on the instance. If a snapshot is requested while another sync is already running, the new job is queued (FIFO) and starts automatically when the active job finishes. A content type cannot have more than one running or queued sync at once.
|
|
63
63
|
|
|
64
|
-
On the home page,
|
|
64
|
+
On the home page, users pick a content type, review differences between local entries and the snapshot, select what to promote (including related content when applicable), and can turn on include media to copy Media Library files. XECP then pushes the selected entries to the target.
|
|
65
65
|
|
|
66
66
|
## ⚠️ Important Considerations
|
|
67
67
|
|
|
@@ -69,7 +69,7 @@ On the home page, operators pick a content type, review differences between loca
|
|
|
69
69
|
|
|
70
70
|
Promotion and meaningful entity comparison require compatible schemas between source and target. If schemas do not match, the home page shows a schema-mismatch alert and blocks promote / get-snapshot actions until the environments are aligned.
|
|
71
71
|
|
|
72
|
-
Schema comparison is **not** run for every content type in the app. It covers only content types configured under **Settings → Content Promotion → Configuration**, excluding
|
|
72
|
+
Schema comparison is **not** run for every content type in the app. It covers only content types configured under **Settings → Content Promotion → Configuration**, excluding content types listed in `excludedContentTypes` and `nonPromotableContentTypes` (and a small set of plugin-owned content types). Components are compared only when they are used by that scoped set. If no content types are configured, the comparison scope is empty and is treated as a match.
|
|
73
73
|
|
|
74
74
|
### Entity comparison depth
|
|
75
75
|
|
|
@@ -92,21 +92,15 @@ The target API token is stored encrypted using the plugin `encryptionKey`. Use a
|
|
|
92
92
|
| **Content-Type Builder** | `getContentTypes`, `getComponents` | Schema comparison |
|
|
93
93
|
| **Upload** | `find`, `upload` | Media match (`GET /api/upload/files`) and upload / replace (`POST /api/upload`) |
|
|
94
94
|
|
|
95
|
-
Grant these for every content type in Configuration that can be promoted or appears as related content. Do not grant delete unless required for other reasons
|
|
95
|
+
Grant these for every content type in Configuration that can be promoted or appears as related content. Do not grant delete unless required for other reasons. XECP does not delete remote entries.
|
|
96
96
|
|
|
97
97
|
### Media uploads
|
|
98
98
|
|
|
99
|
-
When
|
|
99
|
+
When include media is on, the plugin uses Strapi’s **Upload API** to reuse, replace, or upload library files. That setting covers schema **media** fields, **Blocks** image nodes, and **Markdown** (`richtext`) file links. There is no separate checkbox for Blocks or Markdown. Uploaded files are stored in the **API Uploads** folder. This destination is fixed by Strapi’s upload pipeline and **cannot be changed** by the plugin. Replacing images that already exist on the target environment causes them to **lose folder info** and appear in the **root** Media Library folder, while the folder file count is **not updated**. This is a **Strapi bug**, not XECP behaviour.
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
With include media on, source files are copied to the target library and media fields / embedded URLs are pointed at those target files. Removing media from entity fields, reordering files, or changing media metadata (alternative text, caption) requires include media.
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
- reordering media
|
|
105
|
-
- changing media metadata
|
|
106
|
-
|
|
107
|
-
Without “Update media” selected, those field changes are not applied on the target.
|
|
108
|
-
|
|
109
|
-
Replacing images that already exist on the target environment causes them to **lose folder info** and appear in the **root** Media Library folder, while the folder file count is **not updated**. This is a **Strapi bug**, not XECP behaviour.
|
|
103
|
+
With include media off, the entry is still promoted. New entries are created without media files. Updates keep the target’s existing library files.
|
|
110
104
|
|
|
111
105
|
## 🔧 Configuration
|
|
112
106
|
|
|
@@ -131,7 +125,7 @@ module.exports = {
|
|
|
131
125
|
staleSyncLockMs: 6 * 60 * 1000,
|
|
132
126
|
/**
|
|
133
127
|
* Optional. Content types excluded from the promotion graph and remote push,
|
|
134
|
-
* but still configurable as related types in settings.
|
|
128
|
+
* but still configurable as related content types in settings.
|
|
135
129
|
*/
|
|
136
130
|
nonPromotableContentTypes: [],
|
|
137
131
|
/**
|
|
@@ -139,6 +133,14 @@ module.exports = {
|
|
|
139
133
|
* (not in settings, comparison, or promotion).
|
|
140
134
|
*/
|
|
141
135
|
excludedContentTypes: [],
|
|
136
|
+
/**
|
|
137
|
+
* Optional. Fields each environment keeps for itself (for example per-environment
|
|
138
|
+
* counters). They are ignored when comparing content and are not overwritten on promote.
|
|
139
|
+
* Use dotted paths for fields inside components and dynamic zones.
|
|
140
|
+
*/
|
|
141
|
+
environmentSpecificFields: {
|
|
142
|
+
'api::article.article': ['views', 'stats.views'],
|
|
143
|
+
},
|
|
142
144
|
},
|
|
143
145
|
},
|
|
144
146
|
};
|
|
@@ -150,8 +152,9 @@ Then configure the target environment and promotable content types under **Setti
|
|
|
150
152
|
|
|
151
153
|
- `encryptionKey` (string, **required**): Exactly 32 characters. Encrypts the target environment API key.
|
|
152
154
|
- `staleSyncLockMs` (number, optional): Maximum duration for a running sync job before it is considered stale.
|
|
153
|
-
- `nonPromotableContentTypes` (string[], optional):
|
|
154
|
-
- `excludedContentTypes` (string[], optional):
|
|
155
|
+
- `nonPromotableContentTypes` (string[], optional): content types excluded from promotion / remote push / content hashes, but allowed as related content types in settings.
|
|
156
|
+
- `excludedContentTypes` (string[], optional): content types fully ignored by XECP.
|
|
157
|
+
- `environmentSpecificFields` (object, optional): per content type, a list of field names (dotted paths for fields inside components and dynamic zones) that stay specific to each environment. They do not affect comparison status and promote leaves the target's value untouched. Works on any field except relations and whole components or dynamic zones; the unique key cannot be listed. Run a snapshot sync after changing this list.
|
|
155
158
|
|
|
156
159
|
### Environment variables
|
|
157
160
|
|