@smbcloud / cli / commits / 80e99f8

setup monorepo

Seto committed Jan 6, 2026 at 19:28 UTC 80e99f846f6c73e56b3cdf6ae3e1923c1fa5e462
7 files changed +13 -4
crates/cli/src/deploy/config.rs
+1 -1
@@ -49,7 +49,7 @@ pub(crate) async fn get_config(
49 let config: Config = match toml::from_str(&config_content) {
50 Ok(value) => value,
51 Err(e) => {
52 - println!("{}", e);
52 + println!("Error parsing config: {}", e);
53 spinner.stop_and_persist(&fail_symbol(), fail_message("Config unsync."));
54 handle_config_error()?
55 }
crates/cli/src/deploy/detect_runner.rs
+7 -1
@@ -2,11 +2,12 @@ use {
2 crate::ui::{fail_message, fail_symbol, succeed_message, succeed_symbol},
3 anyhow::Result,
4 smbcloud_model::runner::Runner,
5 + smbcloud_utils::config::Config,
6 spinners::Spinner,
7 std::{env::current_dir, path::Path},
8 };
9
9 -pub(crate) async fn detect_runner() -> Result<Runner> {
10 +pub(crate) async fn detect_runner(config: &Config) -> Result<Runner> {
11 let mut spinner: Spinner = Spinner::new(
12 spinners::Spinners::SimpleDotsScrolling,
13 succeed_message("Checking runner"),
@@ -24,6 +25,11 @@ pub(crate) async fn detect_runner() -> Result<Runner> {
25 );
26 }
27 };
28 +
29 + // See if we have a monorepo setup.
30 + if config.project.runner == Runner::Monorepo && config.projects.is_some() {
31 + return Ok(Runner::Monorepo);
32 + }
33 let runner = match Runner::from(&path) {
34 Ok(runner) => runner,
35 Err(_) => {
crates/cli/src/deploy/process_deploy.rs
+1 -1
@@ -42,7 +42,7 @@ pub async fn process_deploy(env: Environment) -> Result<CommandResult> {
42 let config = get_config(env, Some(&access_token)).await?;
43
44 // Check runner.
45 - let runner = detect_runner().await?;
45 + let runner = detect_runner(&config).await?;
46
47 // Validate config with project.
48 check_project(env, &access_token, config.project.id).await?;
crates/cli/src/deploy/setup_project.rs
+1
@@ -72,6 +72,7 @@ pub(crate) async fn setup_project(
72 project,
73 name,
74 description,
75 + projects: None,
76 };
77
78 // Ensure .smb directory exists
crates/smbcloud-model/src/project.rs
+1
@@ -19,6 +19,7 @@ pub struct Project {
19 pub id: i32,
20 pub name: String,
21 pub runner: Runner,
22 + pub path: Option<String>,
23 pub repository: Option<String>,
24 pub description: Option<String>,
25 pub created_at: DateTime<Utc>,
crates/smbcloud-model/src/runner.rs
+1 -1
@@ -9,7 +9,7 @@ use {
9 },
10 };
11
12 -#[derive(Debug, Deserialize_repr, Serialize_repr, Clone, Copy)]
12 +#[derive(Debug, Deserialize_repr, Serialize_repr, Clone, Copy, PartialEq)]
13 #[repr(u8)]
14 #[tsync::tsync]
15 pub enum Runner {
crates/smbcloud-utils/src/config.rs
+1
@@ -9,6 +9,7 @@ pub struct Config {
9 pub name: String,
10 pub description: Option<String>,
11 pub project: Project,
12 + pub projects: Option<Vec<Project>>,
13 }
14
15 impl Config {