@numericoach/gskills-admin-cli 0.1.13 → 0.1.14
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 +2 -0
- package/dist/gskills-admin.js +14 -0
- package/package.json +1 -1
- package/skills/gskills-admin-cli/SKILL.md +2 -0
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ gskills-admin sync diff --target <instanceId> --preset client-content --output j
|
|
|
30
30
|
gskills-admin sync run --targets <instanceId,instanceId> --only pages,quizzes --dry-run --output json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
Language-limited menu sync writes are blocked from the CLI. Run the diff first, sync the language-limited content without `menus`, or sync menus without `--languages` after the backend non-destructive sync patch is deployed.
|
|
34
|
+
|
|
33
35
|
Deploy cache can be invalidated at the same scopes as the super-admin content settings screen:
|
|
34
36
|
|
|
35
37
|
```bash
|
package/dist/gskills-admin.js
CHANGED
|
@@ -1216,6 +1216,7 @@ var runSyncCommand = async (action, ctx) => {
|
|
|
1216
1216
|
sourceInstanceId: getStringFlag(ctx, "source") ?? "global",
|
|
1217
1217
|
options: buildSyncOptions(ctx)
|
|
1218
1218
|
};
|
|
1219
|
+
assertSyncWriteIsNonDestructive(action, basePayload.options, ctx);
|
|
1219
1220
|
const endpoint = action === "diff" || hasFlag(ctx, "dry-run") ? "/api/cli/sync/diff" : "/api/cli/sync/run";
|
|
1220
1221
|
const runForTarget = (targetInstanceId) => requestApi(endpoint, {
|
|
1221
1222
|
method: "POST",
|
|
@@ -1236,6 +1237,19 @@ var runSyncCommand = async (action, ctx) => {
|
|
|
1236
1237
|
}
|
|
1237
1238
|
return { targets: results };
|
|
1238
1239
|
};
|
|
1240
|
+
var assertSyncWriteIsNonDestructive = (action, options, ctx) => {
|
|
1241
|
+
if (action !== "run" || hasFlag(ctx, "dry-run"))
|
|
1242
|
+
return;
|
|
1243
|
+
if (options.menus && options.allowedLanguageCodes.length > 0) {
|
|
1244
|
+
throw new CliError("Partial menu sync is blocked from the CLI because it can hide existing translations on older backends.", 2, {
|
|
1245
|
+
safeAlternatives: [
|
|
1246
|
+
"Run sync diff first.",
|
|
1247
|
+
"Remove menus from --only for language-limited syncs.",
|
|
1248
|
+
"Run menus without --languages only after backend non-destructive sync is deployed."
|
|
1249
|
+
]
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1239
1253
|
var runCacheCommand = async (action, ctx) => {
|
|
1240
1254
|
if (!action || action === "help")
|
|
1241
1255
|
return cacheHelp();
|
package/package.json
CHANGED
|
@@ -195,6 +195,8 @@ Use selectors for narrow syncs:
|
|
|
195
195
|
gskills-admin sync run --target <instanceId> --pages <pageId,pageId> --languages fr,en --dry-run --output json
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
+
Language-limited menu sync writes are blocked from the CLI. Run the diff first, sync the language-limited content without `menus`, or sync menus without `--languages` after the backend non-destructive sync patch is deployed.
|
|
199
|
+
|
|
198
200
|
Use `sync diff` before a real run when the user wants to inspect what would change. It uses the same shared diff-preview system as the super-admin sync UI.
|
|
199
201
|
|
|
200
202
|
```bash
|