@drip-apex/apex-cli 0.6.2 → 0.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drip-apex/apex-cli",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "license": "MIT",
5
5
  "description": "Apex CLI for managing experiments, approved roadmap ideas, and draft workspaces.",
6
6
  "private": false,
@@ -63,3 +63,31 @@ Platform administrators can archive a mistakenly created shop with
63
63
  `apex admin shops restore <shopId>`. Archive refuses a shop with running tests;
64
64
  stop those tests rather than retrying or overriding the refusal. Restore leaves
65
65
  delivery controlled by the runtime kill switch.
66
+
67
+
68
+ ## Project code
69
+
70
+ ```sh
71
+ apex project-code get --shop example.com --json
72
+ apex project-code diff --file project-code.json --shop example.com --json
73
+ apex project-code set --file project-code.json --shop example.com --backup previous-code.json --json
74
+ ```
75
+
76
+ The input is a partial projectCode object, for example `{ "css": "body { color: red; }" }`.
77
+ Supported fields are `enabled` (boolean) and `css`, `helperJs`, and `js` (strings or null).
78
+ Each code field permits at most 20,000 characters. Omitted fields remain unchanged.
79
+ Null or blank code clears that field. Unknown fields and empty objects are rejected.
80
+
81
+ GET returns complete code, shop identity, and an opaque version. DIFF returns effective
82
+ before/after values and changed fields without writing. SET creates a new backup file
83
+ with complete previous code, identity, capture time, and the exact version before PATCH.
84
+ It never replaces an existing backup. Backup failures prevent the write. An effective
85
+ no-op returns `unchanged`, without a PATCH or backup file.
86
+
87
+ The backed-up version becomes expectedVersion unchanged. A conflict returns exit 5,
88
+ keeps the backup, and does not retry. Read the latest state and preview it before a new
89
+ attempt with a new backup path. Authentication uses exit 2; invalid input uses exit 3.
90
+ A successful write returns `saved`, its diff, backup path, current version, writtenVersion,
91
+ and precompile result. A failed precompile is a saved-write warning. All warnings remain
92
+ in JSON and are also written to stderr. User keys resolve domains or pin UUID context;
93
+ shop keys must match the requested identity before any backup or write.