Add @filehub/rclone package #89
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/rclone-rc-fetch-package-f64ded"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
@filehub/rclone(packages/rclone), a fetch-based client for therclone rcHTTP API.createRcloneClient({ url, user?, pass?, fetch?, timeoutMs? })with a typedcall()plus helpers:list,listRemotes,listProviders,mkdir,deleteFile,startJob,jobStatus,stopJob,noop.rcloneCommands) maps known command names to valibot params and response schemas (23 commands includingcore/stats,config/providers,operations/*,sync/*,job/*).call("job/status", { jobid })is fully typed and validated. Unregistered commands can pass their ownschema.async,group) mapped to rclone's_async/_group, so they cannot clash with real params such ascore/stats'group.operations/list,operations/stat,config/providers) are mapped to camelCase.nullare normalised to[].RcloneError(non-2xx),RcloneResponseError(non-JSON or schema mismatch),RcloneRequestError(network failure or timeout, including a timeout while the body streams, withtimedOut). Per-calltimeoutMs(nulldisables) andsignalare supported.TextEncoder/btoa, so it has no Node-only dependency and handles UTF-8 credentials.fetch, plus 14 integration tests that run against a realrclone rcd(open and basic-auth servers, with afiles:alias remote like the Docker image). SetRCLONE_BINto choose the binary; the integration suite skips itself when rclone can't be run.Notes
mise.toml), and the shape oftransferringduring an active transfer is untested.config/create|update|delete|password,vfs/*,options/*,sync/bisync,operations/check,mount/*.Test plan
pnpm --filter @filehub/rclone testpnpm --filter @filehub/rclone typecheckbiome checkandkniprclone rcd1.69.0