From 3ffbec1aa1cb816a99f791cbe16e878734f90ed9 Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com> Date: Fri, 11 Nov 2022 17:42:32 -0800 Subject: [PATCH] feat(next-dev): align devserver cli options to napi bindings (#2653) --- crates/next-dev/src/devserver_options.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/next-dev/src/devserver_options.rs b/crates/next-dev/src/devserver_options.rs index 826f69c492b9d..ebc51eaa40041 100644 --- a/crates/next-dev/src/devserver_options.rs +++ b/crates/next-dev/src/devserver_options.rs @@ -66,18 +66,23 @@ pub struct DevServerOptions { pub log_detail: bool, // Inherited options from next-dev, need revisit later. - // These are not supported by CLI yet. - #[cfg(feature = "serializable")] + #[cfg_attr(feature = "cli", clap(long))] #[cfg_attr(feature = "serializable", serde(default))] + /// If port is not explicitly specified, use different port if it's already + /// in use. pub allow_retry: bool, - #[cfg(feature = "serializable")] + #[cfg_attr(feature = "cli", clap(long))] #[cfg_attr(feature = "serializable", serde(default))] + /// Internal for next.js, no specific usage yet. pub dev: bool, - #[cfg(feature = "serializable")] + #[cfg_attr(feature = "cli", clap(long))] #[cfg_attr(feature = "serializable", serde(default))] + /// Internal for next.js, no specific usage yet. pub is_next_dev_command: bool, - #[cfg(feature = "serializable")] + #[cfg_attr(feature = "cli", clap(long))] #[cfg_attr(feature = "serializable", serde(default))] + /// Specify server component external packages explicitly. This is an + /// experimental flag. pub server_components_external_packages: Vec, }