Repository navigation
feat: change live site settings, restore revisions and manage media - #7
Merged
Merged
Conversation
- styling set, social set, footer set and headers update read the current value, apply the given fields and send the whole object back, since the API's saves are full replacements. Read-only fields are stripped. - pages create and update; update keeps the meta fields it was not given, which the API would otherwise clear. - areas create, update and delete. - revisions restore. - media import, upload (to the presigned URL, with no credentials sent to the storage host) and update. - Commands that replace or delete prompt on a terminal. Navigation saves are not included; the API's navigation shape is changing. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Phase 3: commands that write to the live site.
styling set,social set,footer setandheaders update. The API's saves replace the whole object, so each command reads the current value, applies the fields given (key=valueand--data), and sends the whole object back. Only what you pass changes. Read-only fields from the read are stripped; a field the setting does not have is exit 2 before anything is sent.pages createandpages update.updatekeeps the meta fields it was not given, which the API would otherwise clear.areas create | update | delete.revisions restore <revisionUuid> [--message]. Restoring the current revision is refused by the API (REVISION_ALREADY_CURRENT) and reported with a hint.media import <url>,media upload <file>andmedia update <mediaUuid>. Upload requests a presigned URL, sends the bytes to the storage host, and confirms. The API key and token are never sent to the storage host.-yskips); a script or agent is not asked. Commands that only add (pages create,areas create,media import,media upload) do not prompt.Not included
Navigation saves. The API's navigation read and save shapes are being changed; a
nav setcommand will follow once that lands.Testing
cargo build,cargo test(166 tests),cargo clippy --all-targets -- -D warnings,cargo fmt --checkandcargo deny checkpass.pages create(the API has no page delete to undo it), a successfulheaders update(the local site has no headers), and storage refusals on upload.Found along the way
areas updaterefuses a custom URL on an area that has a route location unless the route location is cleared in the same call.🤖 Generated with Claude Code