D2: engine commands for the remote browser, compare and sync; save before upload
deploy.browse, readRemote, writeRemote, renameRemote, mkdirRemote, deleteRemote (confirm: true required), compare, sync (confirmDelete required for deletions). deploy.upload saves dirty buffers under its paths first (saveFirst, default true) without queueing uploads on save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a8ad74755c
commit
7601ce12f6
5 changed files with 673 additions and 11 deletions
|
|
@ -112,6 +112,19 @@ fn save(state: &mut State, command: &str, id: BufferId) -> Result<u64, EngineErr
|
|||
Ok(version)
|
||||
}
|
||||
|
||||
/// Writes buffer `id` to disk like `file.save`, for other commands (such as
|
||||
/// `deploy.upload`, which saves before it uploads).
|
||||
///
|
||||
/// # Errors
|
||||
/// Like `file.save`.
|
||||
pub(super) fn save_buffer(
|
||||
state: &mut State,
|
||||
command: &str,
|
||||
id: BufferId,
|
||||
) -> Result<u64, EngineError> {
|
||||
save(state, command, id)
|
||||
}
|
||||
|
||||
/// Params of `file.save`.
|
||||
#[derive(Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue