From b97dfb01b5d097ea9f4f40affc8498831fabd8bb Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Fri, 12 Dec 2025 15:13:12 +0100 Subject: [PATCH] feat(unstable): deploy config allow app to be optional (#31567) --- cli/main.rs | 7 ++++++- libs/config/deno_json/mod.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/main.rs b/cli/main.rs index f0ac9ce72c..1ca87345e3 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -39,6 +39,7 @@ use std::path::PathBuf; use std::sync::Arc; use args::TaskFlags; +use deno_core::anyhow; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::futures::FutureExt; @@ -1046,7 +1047,11 @@ async fn initialize_tunnel( .to_deploy_config()? .expect("auth to be called"); - (deploy_config.org, deploy_config.app) + let Some(app) = deploy_config.app else { + anyhow::bail!("The 'app' key is missing from the 'deploy' configuration"); + }; + + (deploy_config.org, app) }; let Some(addr) = tokio::net::lookup_host(&host).await?.next() else { diff --git a/libs/config/deno_json/mod.rs b/libs/config/deno_json/mod.rs index a6206c84f0..d16c2a1939 100644 --- a/libs/config/deno_json/mod.rs +++ b/libs/config/deno_json/mod.rs @@ -1071,7 +1071,7 @@ impl NodeModulesDirMode { #[serde(deny_unknown_fields)] pub struct DeployConfig { pub org: String, - pub app: String, + pub app: Option, } #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]