A review against the Python client, which shares this client's config
and login cache, found the transfers holding whole files in memory and
several commands answering differently from their Python counterparts.
- Stream uploads and downloads instead of buffering the whole file, so
memory no longer scales with file size times concurrency. Uploads
still declare a Content-Length rather than going out chunked.
- Write a download beside its destination and move it into place once
complete, and refuse a destination that cannot be written, so a
failed transfer leaves what was already there untouched.
- Report the server's own error detail instead of the bare status.
- List locked sub-folders in `ls --json --recursive` using the given
password and skip only those that cannot be unlocked, instead of
failing the whole listing.
- Name each folder's laboratory in JSON output and sort its entries,
matching the Python client's schema and order.
- Ask the server who is logged in for `whoami`, rather than trusting
the cached name.
- Collapse repeated separators and refuse `..` in remote paths.
- Fall back to the API when a laboratory is missing from the cache, so
a newly added one no longer needs a fresh login.
- Verify the login cache digest on read, as the Python client does.
- Accept `-e` as the short form of `--exclude`.
- Satisfy clippy and rustfmt across the crate.
The reply to a refresh carries a new refresh token and the provider
stops honouring the one that was sent. Only the access half was read,
so the cache kept re-sending a token the server had already retired.
- deserialize the refresh half and write it back to the cache, as an
Option so a provider that does not rotate leaves the stored one be
- bound the refresh request on its own: the caller holds a lock that
spans processes while it runs, so a provider that goes quiet would
stall every other request on the machine
- give config create/update one rule for what a remote URL is, and
store it without the trailing slash, matching the Python client so
the two can share config.ini; this drops the validators crate and
77 transitive dependencies with it
- join the base URL and the API's relative download path with the
separator neither of them carries, as download.rs already does
Update digest formatting to manually convert the SHA-256 result bytes
to a hexadecimal string. This resolves a compilation error caused by
upgrading the `sha2` crate to v0.11, where `LowerHex` is no longer
implemented for the return type of `finalize()`.
Record the Rust package version bump in Cargo.lock so the
repository stays consistent after updating the crate version
to 2.0.0.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fetch latest release from Gitea API using existing reqwest client
- Match release asset by BUILD_TARGET triple (supports .tar.gz and .zip)
- Compare versions; show confirmation prompt (skippable with -y/--yes)
- Download archive, extract binary, atomically replace self via self-replace
- Support private repositories via GITEA_TOKEN environment variable
- Expose BUILD_TARGET in build.rs for compile-time target triple detection
- Add .gitea/workflows/release.yml for multi-platform release builds on tag push
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>