fix: add ts number annotations for app-server v2 types (#7492)

These will be more ergonomic to work with in Typescript.
This commit is contained in:
Owen Lin
2025-12-02 10:09:41 -08:00
committed by GitHub
parent 72b95db12f
commit c2f8c4e9f4
3 changed files with 15 additions and 3 deletions

View File

@@ -5,7 +5,9 @@ impl From<v1::ExecOneOffCommandParams> for v2::CommandExecParams {
fn from(value: v1::ExecOneOffCommandParams) -> Self {
Self {
command: value.command,
timeout_ms: value.timeout_ms,
timeout_ms: value
.timeout_ms
.map(|timeout| i64::try_from(timeout).unwrap_or(60_000)),
cwd: value.cwd,
sandbox_policy: value.sandbox_policy.map(std::convert::Into::into),
}