feat(unstable): deploy config allow app to be optional (#31567)

This commit is contained in:
Leo Kettmeir 2025-12-12 15:13:12 +01:00 committed by GitHub
parent b27665f363
commit b97dfb01b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -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 {

View file

@ -1071,7 +1071,7 @@ impl NodeModulesDirMode {
#[serde(deny_unknown_fields)]
pub struct DeployConfig {
pub org: String,
pub app: String,
pub app: Option<String>,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]