@@ -187,7 +187,8 @@ async fn execute(
187187 Some ( f) => f. clone ( ) ,
188188 None => "" . into ( ) ,
189189 } ;
190- let url = matches. get_one :: < u16 > ( "NODE_PORT" )
190+ let url = matches
191+ . get_one :: < u16 > ( "NODE_PORT" )
191192 . map ( |p| format ! ( "http://localhost:{p}" ) ) ;
192193 let download_from = matches
193194 . get_one :: < String > ( "NODE" )
@@ -226,16 +227,12 @@ async fn execute(
226227 Some ( ( "build-start-package" , matches) ) => {
227228 let package_dir = PathBuf :: from ( matches. get_one :: < String > ( "DIR" ) . unwrap ( ) ) ;
228229 let no_ui = matches. get_one :: < bool > ( "NO_UI" ) . unwrap ( ) ;
229- let ui_only = matches
230- . get_one :: < bool > ( "UI_ONLY" )
231- . unwrap_or ( & false ) ;
230+ let ui_only = matches. get_one :: < bool > ( "UI_ONLY" ) . unwrap_or ( & false ) ;
232231 let url = format ! (
233232 "http://localhost:{}" ,
234233 matches. get_one:: <u16 >( "NODE_PORT" ) . unwrap( ) ,
235234 ) ;
236- let skip_deps_check = matches
237- . get_one :: < bool > ( "SKIP_DEPS_CHECK" )
238- . unwrap ( ) ;
235+ let skip_deps_check = matches. get_one :: < bool > ( "SKIP_DEPS_CHECK" ) . unwrap ( ) ;
239236 let features = match matches. get_one :: < String > ( "FEATURES" ) {
240237 Some ( f) => f. clone ( ) ,
241238 None => "" . into ( ) ,
@@ -281,12 +278,8 @@ async fn execute(
281278 Some ( ( "connect" , matches) ) => {
282279 let local_port = matches. get_one :: < u16 > ( "LOCAL_PORT" ) . unwrap ( ) ;
283280 let disconnect = matches. get_one :: < bool > ( "IS_DISCONNECT" ) . unwrap ( ) ;
284- let host = matches
285- . get_one :: < String > ( "HOST" )
286- . map ( |s| s. as_ref ( ) ) ;
287- let host_port = matches
288- . get_one :: < u16 > ( "HOST_PORT" )
289- . map ( |hp| hp. clone ( ) ) ;
281+ let host = matches. get_one :: < String > ( "HOST" ) . map ( |s| s. as_ref ( ) ) ;
282+ let host_port = matches. get_one :: < u16 > ( "HOST_PORT" ) . map ( |hp| hp. clone ( ) ) ;
290283 connect:: execute ( * local_port, * disconnect, host, host_port)
291284 }
292285 Some ( ( "dev-ui" , matches) ) => {
@@ -344,8 +337,7 @@ async fn execute(
344337 let publisher = matches
345338 . get_one :: < String > ( "PUBLISHER" )
346339 . and_then ( |s : & String | Some ( s. as_str ( ) ) ) ;
347- let package_dir =
348- PathBuf :: from ( matches. get_one :: < String > ( "DIR" ) . unwrap ( ) ) ;
340+ let package_dir = PathBuf :: from ( matches. get_one :: < String > ( "DIR" ) . unwrap ( ) ) ;
349341 let url = format ! (
350342 "http://localhost:{}" ,
351343 matches. get_one:: <u16 >( "NODE_PORT" ) . unwrap( ) ,
@@ -375,8 +367,7 @@ async fn execute(
375367 setup:: execute ( * verbose)
376368 }
377369 Some ( ( "start-package" , matches) ) => {
378- let package_dir =
379- PathBuf :: from ( matches. get_one :: < String > ( "DIR" ) . unwrap ( ) ) ;
370+ let package_dir = PathBuf :: from ( matches. get_one :: < String > ( "DIR" ) . unwrap ( ) ) ;
380371 let url = format ! (
381372 "http://localhost:{}" ,
382373 matches. get_one:: <u16 >( "NODE_PORT" ) . unwrap( ) ,
@@ -910,7 +901,7 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result<Command> {
910901 . short ( 't' )
911902 . long ( "template" )
912903 . help ( "Template to create" )
913- . value_parser ( [ "chat" , "echo" , "fibonacci" , "file_transfer" ] )
904+ . value_parser ( [ "blank" , " chat", "echo" , "fibonacci" , "file_transfer" ] )
914905 . default_value ( "chat" )
915906 )
916907 . arg ( Arg :: new ( "UI" )
@@ -932,6 +923,7 @@ async fn make_app(current_dir: &std::ffi::OsString) -> Result<Command> {
932923 )
933924 . arg ( Arg :: new ( "PUBLISHER" )
934925 . action ( ArgAction :: Set )
926+ . short ( 'u' )
935927 . long ( "publisher" )
936928 . help ( "Name of the publisher (Overrides DIR)" )
937929 . required ( false )
0 commit comments