@@ -16,6 +16,7 @@ pub enum Runner {
1616 NodeJs ,
1717 Ruby ,
1818 Swift ,
19+ Monorepo = 255 ,
1920}
2021
2122impl Display for Runner {
@@ -45,6 +46,7 @@ pub enum SwiftFramework {
4546
4647impl Runner {
4748 pub fn from ( repo_path : & PathBuf ) -> Result < Runner , ErrorResponse > {
49+ // See if we have a framework-based config.
4850 if repo_path. join ( "package.json" ) . exists ( )
4951 && ( next_config_exists ( repo_path) || astro_config_exists ( repo_path) )
5052 {
@@ -57,10 +59,8 @@ impl Runner {
5759 if repo_path. join ( "Package.swift" ) . exists ( ) {
5860 return Ok ( Runner :: Swift ) ;
5961 }
60- Err ( ErrorResponse :: Error {
61- error_code : UnsupportedRunner ,
62- message : UnsupportedRunner . message ( None ) . to_string ( ) ,
63- } )
62+ // See if we have a monorepo setup.
63+ non_framework_runner ( )
6464 }
6565
6666 pub fn git_host ( & self ) -> String {
@@ -69,12 +69,20 @@ impl Runner {
6969
7070 fn api ( & self ) -> & str {
7171 match self {
72+ Runner :: Monorepo => "monorepo" ,
7273 Runner :: NodeJs => "api" ,
7374 Runner :: Ruby | Runner :: Swift => "api-1" ,
7475 }
7576 }
7677}
7778
79+ fn non_framework_runner ( ) -> Result < Runner , ErrorResponse > {
80+ Err ( ErrorResponse :: Error {
81+ error_code : UnsupportedRunner ,
82+ message : UnsupportedRunner . message ( None ) . to_string ( ) ,
83+ } )
84+ }
85+
7886// Helper function to detect any next.config.* file
7987fn next_config_exists ( repo_path : & PathBuf ) -> bool {
8088 if let Ok ( entries) = fs:: read_dir ( repo_path) {
0 commit comments