mirror of
https://github.com/denoland/deno.git
synced 2025-12-23 08:48:24 +00:00
feat(unstable): deploy config allow app to be optional (#31567)
This commit is contained in:
parent
b27665f363
commit
b97dfb01b5
2 changed files with 7 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue