@pixlcore/xycli 1.1.0 → 1.1.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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This tutorial keeps Events, workflows, and Plugins in both xyOps and Git. Existing definitions can be edited on either side, and deletions can start on either side. New definitions are created in the xyOps UI and exported to Git. Every sync runs because Git accepted a push or xyOps recorded an activity. There are no cron jobs or recurring sync schedules.
|
|
4
4
|
|
|
5
|
-
Use xyCLI version **v1.1.
|
|
5
|
+
Use xyCLI version **v1.1.1+** (with down-sync delete support) and xyOps version **v1.1.4+** (with System Activity triggers and exclusions). Both features must be available before you enable this workflow.
|
|
6
6
|
|
|
7
7
|
> [!IMPORTANT]
|
|
8
8
|
> **Two-way deletion requires authoritative triggers in both directions.** Run `--up --delete` only in response to an accepted Git change, and run `--down --delete` only in response to xyOps activity. Each invocation has exactly one authoritative side. A single command with both `--up` and `--down` cannot use `--delete`.
|
|
@@ -24,7 +24,7 @@ Use one persistent Git checkout on a machine running xySat. Target all three xyO
|
|
|
24
24
|
|
|
25
25
|
You will need:
|
|
26
26
|
|
|
27
|
-
- A xyOps API Key that can see the **complete** Event and Plugin inventories, update and delete those types, and update global sync state. A restricted or partial inventory is unsafe for up-only deletion.
|
|
27
|
+
- A dedicated xyOps API Key for xyCLI that can see the **complete** Event and Plugin inventories, update and delete those types, and update global sync state. A restricted or partial inventory is unsafe for up-only deletion. You will select this same key in the System Activity trigger exclusions below.
|
|
28
28
|
- A dedicated repository and a persistent checkout, such as `/srv/xyops-automation`, with noninteractive Git pull and push access.
|
|
29
29
|
- A Git author identity for commits generated by xyOps.
|
|
30
30
|
- Shared xyOps job capacity and queue limits on all three Events.
|
|
@@ -171,6 +171,8 @@ Create three Shell Plugin Events in xyOps, initially disabled. Target only the s
|
|
|
171
171
|
| **Export creations from xyOps** | System Activity | `event_create`, `plugin_create` | `/usr/local/sbin/xyops-git-sync create` |
|
|
172
172
|
| **Apply accepted Git pushes** | Manual | No activity selection | `/usr/local/sbin/xyops-git-sync up` |
|
|
173
173
|
|
|
174
|
+
On **each of the two System Activity triggers**, open **Exclude Users / Keys** and select the dedicated xyCLI sync API Key configured on the worker in step 1. xyOps records the key's ID as the activity initiator and skips that trigger when the ID is excluded. This prevents an upsync API update or deletion from launching a redundant downsync job. Leave ordinary users out of the exclusion list so their UI changes still launch the appropriate job. If more than one API Key can make sync writes, exclude each of those keys on both triggers.
|
|
175
|
+
|
|
174
176
|
The update activities make xyOps UI edits flow back to Git too. The separate creation Event runs `sync setup --new`, because ordinary downsync updates existing local sources but does not create files for new xyOps definitions. The setup command's `--down_cmd` runs only when it writes files; the down-delete command's `--down_cmd` runs only after local changes. Neither creates an empty Git commit on a no-op run.
|
|
175
177
|
|
|
176
178
|
The Git Event has an enabled **Manual** trigger so a Git hook or verified webhook receiver can launch it with `xy run` or the [`run_event` API](https://docs.xyops.io/api#run_event). It has no schedule. The Git push is still the authoritative reason for that run.
|
|
@@ -237,6 +239,7 @@ Run these tests with disposable Events and Plugins, not production definitions:
|
|
|
237
239
|
3. Delete it in xyOps. Confirm that the **down** Event removes the XYPDF and owned neighbor files and pushes the deletion.
|
|
238
240
|
4. Edit an existing definition in Git and push. Confirm that the accepted-push trigger runs **up** and updates xyOps.
|
|
239
241
|
5. Delete a different existing definition in Git and push. Confirm that **up** deletes only that definition in xyOps.
|
|
242
|
+
6. For both Git-initiated tests, confirm that the sync API Key's activity did not launch either System Activity Event. A second downsync job means the key is missing from a trigger's exclusion list.
|
|
240
243
|
|
|
241
244
|
Before the first live delete, preview each direction against the complete checkout and inspect every proposed deletion:
|
|
242
245
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixlcore/xycli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A complete command-line interface for the xyOps workflow automation system.",
|
|
5
5
|
"author": "Joseph Huckaby <jhuckaby@pixlcore.com>",
|
|
6
6
|
"homepage": "https://github.com/pixlcore/xycli",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"test:offline": "node --test test/config.test.js test/help.test.js test/markdown.test.js test/sync-buckets-unit.test.js test/sync-syshook-unit.test.js test/sync-unit.test.js test/toast.test.js test/upgrade.test.js test/utils-unit.test.js",
|
|
25
25
|
"changelog": "node tools/changelog.js"
|
|
26
26
|
},
|
|
27
|
+
"overrides": {
|
|
28
|
+
"basic-ftp": "6.2.1"
|
|
29
|
+
},
|
|
27
30
|
"dependencies": {
|
|
28
31
|
"@pixlcore/xyops-sdk": "^1.0.7",
|
|
29
32
|
"cli-highlight": "2.1.11",
|