diff --git a/Cargo.lock b/Cargo.lock index 73798458..781fe6ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1945,8 +1945,8 @@ dependencies = [ "rand", "regex", "reqwest", - "rivet-cli-core", "rivet-term", + "rivet-toolchain-core", "sentry", "serde", "serde_json", @@ -1969,22 +1969,6 @@ dependencies = [ "zip", ] -[[package]] -name = "rivet-cli-core" -version = "0.0.1" -dependencies = [ - "anyhow", - "home", - "openssl", - "rivet-api-ee", - "serde", - "serde_json", - "thiserror", - "tokio", - "tower", - "vergen", -] - [[package]] name = "rivet-term" version = "0.1.0" @@ -1999,8 +1983,20 @@ dependencies = [ ] [[package]] -name = "rivet-toolchain" -version = "0.1.0" +name = "rivet-toolchain-core" +version = "0.0.1" +dependencies = [ + "anyhow", + "home", + "openssl", + "rivet-api-ee", + "serde", + "serde_json", + "thiserror", + "tokio", + "tower", + "vergen", +] [[package]] name = "rustc-demangle" diff --git a/Cargo.toml b/Cargo.toml index b27afec8..c85f59eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [workspace] members = [ - "core", - "cli", "toolchain", + "rivet-toolchain-core", + "rivet-cli", ] # Config for 'cargo dist' diff --git a/cli/Cargo.toml b/rivet-cli/Cargo.toml similarity index 95% rename from cli/Cargo.toml rename to rivet-cli/Cargo.toml index 0d3b1575..a6b9bb61 100644 --- a/cli/Cargo.toml +++ b/rivet-cli/Cargo.toml @@ -19,8 +19,7 @@ async-posthog = { git = "https://github.com/rivet-gg/posthog-rs.git", rev = "ef4 async-stream = "0.3.3" chrono = "0.4.21" clap = { version = "3.2.16", features = ["derive", "env"] } -cli-core = { path = "../core", package = "rivet-cli-core" } -cli-toolchain = { path = "../core", package = "rivet-toolchain" } +toolchain-core = { path = "../rivet-toolchain-core", package = "rivet-toolchain-core" } config = { git = "https://github.com/AngelOnFira/config-rs", rev = "04e61354912543e23e70b6851a3f4b03ce69471c", default-features = false, features = ["yaml", "toml", "json"] } console = "0.15" ctrlc = { version = "3.2", features = ["termination"] } diff --git a/cli/build.rs b/rivet-cli/build.rs similarity index 100% rename from cli/build.rs rename to rivet-cli/build.rs diff --git a/cli/src/commands/avatar.rs b/rivet-cli/src/commands/avatar.rs similarity index 91% rename from cli/src/commands/avatar.rs rename to rivet-cli/src/commands/avatar.rs index 3a3af911..21751cc1 100644 --- a/cli/src/commands/avatar.rs +++ b/rivet-cli/src/commands/avatar.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::apis; +use toolchain_core::rivet_api::apis; use global_error::prelude::*; use tabled::Tabled; @@ -12,7 +12,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::List => { let custom_avatars_res = unwrap!( diff --git a/cli/src/commands/backend/database.rs b/rivet-cli/src/commands/backend/database.rs similarity index 97% rename from cli/src/commands/backend/database.rs rename to rivet-cli/src/commands/backend/database.rs index 62637085..e66981ed 100644 --- a/cli/src/commands/backend/database.rs +++ b/rivet-cli/src/commands/backend/database.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use clap::Parser; -use cli_core::rivet_api::apis; +use toolchain_core::rivet_api::apis; use global_error::prelude::*; use uuid::Uuid; @@ -64,7 +64,7 @@ pub struct Opts { } pub async fn provision_database( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, project_id: Uuid, env_id: Uuid, ) -> GlobalResult<()> { diff --git a/cli/src/commands/backend/deploy.rs b/rivet-cli/src/commands/backend/deploy.rs similarity index 97% rename from cli/src/commands/backend/deploy.rs rename to rivet-cli/src/commands/backend/deploy.rs index f99fda51..7b8da27c 100644 --- a/cli/src/commands/backend/deploy.rs +++ b/rivet-cli/src/commands/backend/deploy.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, path::PathBuf, sync::Arc}; use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use futures_util::{StreamExt, TryStreamExt}; use global_error::prelude::*; use serde::Deserialize; @@ -28,7 +28,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { let project = get_or_create_project(ctx).await?; let project_id_str = project.project_id.to_string(); diff --git a/cli/src/commands/backend/environment/create.rs b/rivet-cli/src/commands/backend/environment/create.rs similarity index 92% rename from cli/src/commands/backend/environment/create.rs rename to rivet-cli/src/commands/backend/environment/create.rs index 95ca999b..f862798e 100644 --- a/cli/src/commands/backend/environment/create.rs +++ b/rivet-cli/src/commands/backend/environment/create.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; #[derive(Parser)] @@ -16,7 +16,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { let project_res = apis::ee_cloud_games_projects_api::ee_cloud_games_projects_get( &ctx.openapi_config_cloud, &ctx.game_id, diff --git a/cli/src/commands/backend/environment/mod.rs b/rivet-cli/src/commands/backend/environment/mod.rs similarity index 74% rename from cli/src/commands/backend/environment/mod.rs rename to rivet-cli/src/commands/backend/environment/mod.rs index db36ce17..8d4bbe70 100644 --- a/cli/src/commands/backend/environment/mod.rs +++ b/rivet-cli/src/commands/backend/environment/mod.rs @@ -9,7 +9,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Create(opts) => opts.execute(ctx).await, } diff --git a/cli/src/commands/backend/mod.rs b/rivet-cli/src/commands/backend/mod.rs similarity index 96% rename from cli/src/commands/backend/mod.rs rename to rivet-cli/src/commands/backend/mod.rs index 32f4c928..397cf207 100644 --- a/cli/src/commands/backend/mod.rs +++ b/rivet-cli/src/commands/backend/mod.rs @@ -1,7 +1,7 @@ use std::{collections::HashMap, io::Write, path::PathBuf, str::FromStr}; use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; use tempfile::NamedTempFile; use tokio::process::Command; @@ -31,7 +31,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Deploy(opts) => opts.execute(&ctx).await, SubCommand::Environment { command } => command.execute(&ctx).await, @@ -43,7 +43,7 @@ impl SubCommand { * Gets or auto-creates a backend project for the game. */ pub async fn get_or_create_project( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, ) -> GlobalResult> { let project_res = apis::ee_cloud_games_projects_api::ee_cloud_games_projects_get( &ctx.openapi_config_cloud, @@ -61,7 +61,7 @@ pub async fn get_or_create_project( } pub async fn passthrough( - ctx: Option<&cli_core::Ctx>, + ctx: Option<&toolchain_core::Ctx>, db_command: Option, ) -> GlobalResult<()> { let mut opengb_env = HashMap::new(); diff --git a/cli/src/commands/cdn.rs b/rivet-cli/src/commands/cdn.rs similarity index 95% rename from cli/src/commands/cdn.rs rename to rivet-cli/src/commands/cdn.rs index 92e499c3..2f34acd1 100644 --- a/cli/src/commands/cdn.rs +++ b/rivet-cli/src/commands/cdn.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use futures_util::{StreamExt, TryStreamExt}; use global_error::prelude::*; use serde::Serialize; @@ -33,7 +33,7 @@ pub struct PushOpts { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Push(push_opts) => { let output = push(ctx, push_opts).await?; @@ -54,7 +54,7 @@ pub struct PushOutput { pub site_id: Uuid, } -pub async fn push(ctx: &cli_core::Ctx, push_opts: &PushOpts) -> GlobalResult { +pub async fn push(ctx: &toolchain_core::Ctx, push_opts: &PushOpts) -> GlobalResult { let reqwest_client = Arc::new(reqwest::Client::new()); let upload_path = env::current_dir()?.join(&push_opts.path); @@ -205,7 +205,7 @@ pub struct BuildPushOpts { } pub async fn build_and_push( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, push_opts: &BuildPushOpts, ) -> GlobalResult { eprintln!(); diff --git a/cli/src/commands/ci.rs b/rivet-cli/src/commands/ci.rs similarity index 93% rename from cli/src/commands/ci.rs rename to rivet-cli/src/commands/ci.rs index 126ced56..fbbc7981 100644 --- a/cli/src/commands/ci.rs +++ b/rivet-cli/src/commands/ci.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::models; +use toolchain_core::rivet_api::models; use global_error::prelude::*; use std::collections::HashMap; use tokio::fs; @@ -16,7 +16,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Generate { command } => command.execute(ctx).await, } @@ -30,7 +30,7 @@ pub enum GenerateOpts { } impl GenerateOpts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { GenerateOpts::GitHub(opts) => gen_github(ctx, opts).await, } @@ -47,7 +47,7 @@ pub struct GenerateGitHubOpts { allow_idle_lobbies: bool, } -async fn gen_github(ctx: &cli_core::Ctx, opts: &GenerateGitHubOpts) -> GlobalResult<()> { +async fn gen_github(ctx: &toolchain_core::Ctx, opts: &GenerateGitHubOpts) -> GlobalResult<()> { let relative_path = opts .path .clone() @@ -71,7 +71,7 @@ async fn gen_github(ctx: &cli_core::Ctx, opts: &GenerateGitHubOpts) -> GlobalRes // TODO: Strings in this workflow are not appropriately escaped async fn gen_github_workflow( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, opts: &GenerateGitHubOpts, ) -> GlobalResult { let mut version = config::read_config(Vec::new(), None).await?; @@ -163,7 +163,7 @@ async fn gen_github_workflow( Ok(workflow) } -fn common_substitute(ctx: &cli_core::Ctx, input: &str) -> String { +fn common_substitute(ctx: &toolchain_core::Ctx, input: &str) -> String { input .replace( "__RIVET_CLI_VERSION__", @@ -187,7 +187,7 @@ fn validate_idle_lobbies( } fn append_dockerfile( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, workflow: &mut String, needs_jobs: &mut Vec, overrides: &mut Vec, diff --git a/cli/src/commands/config.rs b/rivet-cli/src/commands/config.rs similarity index 96% rename from cli/src/commands/config.rs rename to rivet-cli/src/commands/config.rs index b5c185d1..f67da456 100644 --- a/cli/src/commands/config.rs +++ b/rivet-cli/src/commands/config.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; use serde::{Deserialize, Serialize}; use std::collections::HashSet; @@ -13,7 +13,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Validate(opts) => { let errors = opts.execute(ctx).await?; @@ -48,7 +48,7 @@ pub struct ValidateOpts { } impl ValidateOpts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult> { let overrides = parse_config_override_args(&self.overrides)?; let mut rivet_config = read_config(overrides, self.namespace.as_ref().map(String::as_str)).await?; diff --git a/cli/src/commands/deploy.rs b/rivet-cli/src/commands/deploy.rs similarity index 97% rename from cli/src/commands/deploy.rs rename to rivet-cli/src/commands/deploy.rs index 460ac0c3..584413b6 100644 --- a/cli/src/commands/deploy.rs +++ b/rivet-cli/src/commands/deploy.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; use serde::Serialize; use serde_json::json; @@ -67,7 +67,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { // Derive namespace let namespace = match ( self.namespace.as_ref().or(self.namespace_flag.as_ref()), @@ -133,7 +133,7 @@ impl Opts { /// Developers should override config properties instead. For example: `rivet deploy -o matchmaker.docker.image_id=xxxx -o /// cdn.path=xxxx` pub async fn build_and_push_compat( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, overrides: &mut Vec<(String, serde_json::Value)>, build_tag: &Option, build_name: &Option, @@ -195,7 +195,7 @@ pub struct DeployOutput { /// Deploys a new Rivet version. pub async fn deploy( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, display_name: Option<&str>, overrides: Vec<(String, serde_json::Value)>, namespace_name_id: Option<&str>, @@ -312,7 +312,7 @@ pub async fn deploy( /// Builds the Docker image and CDN site if needed. pub async fn build_config_dependencies( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, namespace: Option<&str>, version: &mut models::CloudVersionConfig, display_name: &str, @@ -368,7 +368,7 @@ pub async fn build_config_dependencies( /// /// If none are true, `None` is returned. pub async fn build_and_push_image( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, display_name: &str, docker: &mut Box, format: Option<&struct_fmt::Format>, @@ -417,7 +417,7 @@ pub async fn build_and_push_image( } } pub async fn build_and_push_site( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, namespace: Option<&str>, display_name: &str, cdn: &mut Box, diff --git a/cli/src/commands/dev.rs b/rivet-cli/src/commands/dev.rs similarity index 84% rename from cli/src/commands/dev.rs rename to rivet-cli/src/commands/dev.rs index da353b89..3d236e08 100644 --- a/cli/src/commands/dev.rs +++ b/rivet-cli/src/commands/dev.rs @@ -9,7 +9,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::CreateDevToken(opts) => { rivet_term::status::warn( diff --git a/cli/src/commands/docker/archive.rs b/rivet-cli/src/commands/docker/archive.rs similarity index 100% rename from cli/src/commands/docker/archive.rs rename to rivet-cli/src/commands/docker/archive.rs diff --git a/cli/src/commands/docker/build.rs b/rivet-cli/src/commands/docker/build.rs similarity index 99% rename from cli/src/commands/docker/build.rs rename to rivet-cli/src/commands/docker/build.rs index 64705ed3..07ef43a6 100644 --- a/cli/src/commands/docker/build.rs +++ b/rivet-cli/src/commands/docker/build.rs @@ -53,7 +53,7 @@ pub struct BuildImageOutput { /// Builds an image and archives it to a path. pub async fn build_image( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, dockerfile: &Path, build_kind: super::BuildKind, build_compression: super::BuildCompression, diff --git a/cli/src/commands/docker/mod.rs b/rivet-cli/src/commands/docker/mod.rs similarity index 95% rename from cli/src/commands/docker/mod.rs rename to rivet-cli/src/commands/docker/mod.rs index 2f215022..b3f4c165 100644 --- a/cli/src/commands/docker/mod.rs +++ b/rivet-cli/src/commands/docker/mod.rs @@ -50,7 +50,7 @@ pub struct BuildPushOpts { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Push(push_opts) => { let output = push(ctx, push_opts).await?; @@ -133,7 +133,7 @@ impl BuildCompression { } } -pub async fn push(ctx: &cli_core::Ctx, push_opts: &PushOpts) -> GlobalResult { +pub async fn push(ctx: &toolchain_core::Ctx, push_opts: &PushOpts) -> GlobalResult { // Re-tag image with unique tag let unique_image_tag = generate_unique_image_tag(); let mut tag_cmd = tokio::process::Command::new("docker"); @@ -165,7 +165,7 @@ pub async fn push(ctx: &cli_core::Ctx, push_opts: &PushOpts) -> GlobalResult GlobalResult { // Build image diff --git a/cli/src/commands/docker/push.rs b/rivet-cli/src/commands/docker/push.rs similarity index 95% rename from cli/src/commands/docker/push.rs rename to rivet-cli/src/commands/docker/push.rs index 43332c3d..eb645479 100644 --- a/cli/src/commands/docker/push.rs +++ b/rivet-cli/src/commands/docker/push.rs @@ -1,4 +1,4 @@ -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use futures_util::stream::{StreamExt, TryStreamExt}; use global_error::prelude::*; use serde::Serialize; @@ -32,7 +32,7 @@ pub struct PushOutput { pub image_id: Uuid, } -pub async fn push_tar(ctx: &cli_core::Ctx, push_opts: &PushOpts) -> GlobalResult { +pub async fn push_tar(ctx: &toolchain_core::Ctx, push_opts: &PushOpts) -> GlobalResult { let reqwest_client = Arc::new(reqwest::Client::new()); // Inspect the image diff --git a/cli/src/commands/engine/mod.rs b/rivet-cli/src/commands/engine/mod.rs similarity index 78% rename from cli/src/commands/engine/mod.rs rename to rivet-cli/src/commands/engine/mod.rs index b93068b0..1bdfb1e9 100644 --- a/cli/src/commands/engine/mod.rs +++ b/rivet-cli/src/commands/engine/mod.rs @@ -12,7 +12,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Unreal { command } => command.execute(ctx).await, } diff --git a/cli/src/commands/engine/unreal.rs b/rivet-cli/src/commands/engine/unreal.rs similarity index 95% rename from cli/src/commands/engine/unreal.rs rename to rivet-cli/src/commands/engine/unreal.rs index cc75e52e..3910abda 100644 --- a/cli/src/commands/engine/unreal.rs +++ b/rivet-cli/src/commands/engine/unreal.rs @@ -15,7 +15,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::StartServer => { let pwd = std::env::current_dir()?; diff --git a/cli/src/commands/exec.rs b/rivet-cli/src/commands/exec.rs similarity index 92% rename from cli/src/commands/exec.rs rename to rivet-cli/src/commands/exec.rs index 26b8d904..1bdadfbb 100644 --- a/cli/src/commands/exec.rs +++ b/rivet-cli/src/commands/exec.rs @@ -22,7 +22,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { // Determine token let token = match (self.dev, self.server) { (true, true) => { diff --git a/cli/src/commands/game.rs b/rivet-cli/src/commands/game.rs similarity index 83% rename from cli/src/commands/game.rs rename to rivet-cli/src/commands/game.rs index bf88d8a7..06bcce7b 100644 --- a/cli/src/commands/game.rs +++ b/rivet-cli/src/commands/game.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::apis; +use toolchain_core::rivet_api::apis; use global_error::prelude::*; use serde::Serialize; @@ -19,7 +19,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Get { format } => { let game_res = unwrap!( @@ -49,6 +49,6 @@ impl SubCommand { } } -pub fn dashboard_url(ctx: &cli_core::Ctx, game_id: &str) -> String { +pub fn dashboard_url(ctx: &toolchain_core::Ctx, game_id: &str) -> String { format!("{}/developer/games/{game_id}", ctx.bootstrap.origins.hub) } diff --git a/cli/src/commands/global_config.rs b/rivet-cli/src/commands/global_config.rs similarity index 100% rename from cli/src/commands/global_config.rs rename to rivet-cli/src/commands/global_config.rs diff --git a/cli/src/commands/init.rs b/rivet-cli/src/commands/init.rs similarity index 98% rename from cli/src/commands/init.rs rename to rivet-cli/src/commands/init.rs index c223656d..3bb72329 100644 --- a/cli/src/commands/init.rs +++ b/rivet-cli/src/commands/init.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::{ +use toolchain_core::{ ctx, rivet_api::{apis, models}, Ctx, @@ -155,7 +155,7 @@ async fn init_ctx_and_token( global_config::read_project(|x| x.tokens.cloud.clone()).await? }; let ctx = if let Some(token) = token { - cli_core::ctx::init(override_endpoint.clone(), token).await? + toolchain_core::ctx::init(override_endpoint.clone(), token).await? } else { read_token(term, override_endpoint.clone()).await? }; @@ -314,7 +314,7 @@ pub async fn create_config_default(engine: &Engine) -> GlobalResult { Ok(created_config) } -async fn read_token(term: &Term, override_endpoint: Option) -> GlobalResult { +async fn read_token(term: &Term, override_endpoint: Option) -> GlobalResult { // Create OpenAPI configuration without bearer token to send link request let openapi_config_cloud_unauthed = apis::configuration::Configuration { base_path: override_endpoint @@ -389,7 +389,7 @@ async fn read_token(term: &Term, override_endpoint: Option) -> GlobalRes }; // Create new context - let new_ctx = cli_core::ctx::init( + let new_ctx = toolchain_core::ctx::init( override_endpoint, // Exclude overridden access token to check the token token.clone(), diff --git a/cli/src/commands/mod.rs b/rivet-cli/src/commands/mod.rs similarity index 100% rename from cli/src/commands/mod.rs rename to rivet-cli/src/commands/mod.rs diff --git a/cli/src/commands/ns.rs b/rivet-cli/src/commands/ns.rs similarity index 95% rename from cli/src/commands/ns.rs rename to rivet-cli/src/commands/ns.rs index c7172e8b..039c9dda 100644 --- a/cli/src/commands/ns.rs +++ b/rivet-cli/src/commands/ns.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; use serde::Serialize; use tabled::Tabled; @@ -52,7 +52,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::List => { let game_res = unwrap!( @@ -207,7 +207,7 @@ impl SubCommand { } async fn print_ns( - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, format: &struct_fmt::Format, namespace_id: &str, ) -> GlobalResult<()> { @@ -241,7 +241,7 @@ async fn print_ns( Ok(()) } -pub fn dashboard_url(ctx: &cli_core::Ctx, game_id: &str, ns_id: &str) -> String { +pub fn dashboard_url(ctx: &toolchain_core::Ctx, game_id: &str, ns_id: &str) -> String { format!( "{}/developer/games/{game_id}/namespaces/{ns_id}", ctx.bootstrap.origins.hub diff --git a/cli/src/commands/run.rs b/rivet-cli/src/commands/run.rs similarity index 94% rename from cli/src/commands/run.rs rename to rivet-cli/src/commands/run.rs index 619be637..ea08836b 100644 --- a/cli/src/commands/run.rs +++ b/rivet-cli/src/commands/run.rs @@ -22,7 +22,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { // Read script let config = crate::commands::config::read_config( Vec::new(), diff --git a/cli/src/commands/sidekick/backend_dev.rs b/rivet-cli/src/commands/sidekick/backend_dev.rs similarity index 100% rename from cli/src/commands/sidekick/backend_dev.rs rename to rivet-cli/src/commands/sidekick/backend_dev.rs diff --git a/cli/src/commands/sidekick/backend_gen_sdk.rs b/rivet-cli/src/commands/sidekick/backend_gen_sdk.rs similarity index 100% rename from cli/src/commands/sidekick/backend_gen_sdk.rs rename to rivet-cli/src/commands/sidekick/backend_gen_sdk.rs diff --git a/cli/src/commands/sidekick/deploy.rs b/rivet-cli/src/commands/sidekick/deploy.rs similarity index 94% rename from cli/src/commands/sidekick/deploy.rs rename to rivet-cli/src/commands/sidekick/deploy.rs index 832ca586..e85a2915 100644 --- a/cli/src/commands/sidekick/deploy.rs +++ b/rivet-cli/src/commands/sidekick/deploy.rs @@ -34,7 +34,7 @@ pub struct Output {} impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { // Parse overrides let mut overrides = parse_config_override_args(&self.overrides)?; diff --git a/cli/src/commands/sidekick/exec_command.rs b/rivet-cli/src/commands/sidekick/exec_command.rs similarity index 100% rename from cli/src/commands/sidekick/exec_command.rs rename to rivet-cli/src/commands/sidekick/exec_command.rs diff --git a/cli/src/commands/sidekick/generate_config.rs b/rivet-cli/src/commands/sidekick/generate_config.rs similarity index 100% rename from cli/src/commands/sidekick/generate_config.rs rename to rivet-cli/src/commands/sidekick/generate_config.rs diff --git a/cli/src/commands/sidekick/get_bootstrap_data.rs b/rivet-cli/src/commands/sidekick/get_bootstrap_data.rs similarity index 84% rename from cli/src/commands/sidekick/get_bootstrap_data.rs rename to rivet-cli/src/commands/sidekick/get_bootstrap_data.rs index 3efd7a15..b8e987f7 100644 --- a/cli/src/commands/sidekick/get_bootstrap_data.rs +++ b/rivet-cli/src/commands/sidekick/get_bootstrap_data.rs @@ -18,7 +18,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { Ok(Output { token: ctx.access_token.clone(), api_endpoint: ctx.api_endpoint.clone(), diff --git a/cli/src/commands/sidekick/get_cli_version.rs b/rivet-cli/src/commands/sidekick/get_cli_version.rs similarity index 100% rename from cli/src/commands/sidekick/get_cli_version.rs rename to rivet-cli/src/commands/sidekick/get_cli_version.rs diff --git a/cli/src/commands/sidekick/get_link.rs b/rivet-cli/src/commands/sidekick/get_link.rs similarity index 96% rename from cli/src/commands/sidekick/get_link.rs rename to rivet-cli/src/commands/sidekick/get_link.rs index 514ca9ad..4999e0a7 100644 --- a/cli/src/commands/sidekick/get_link.rs +++ b/rivet-cli/src/commands/sidekick/get_link.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::{ctx, rivet_api::apis}; +use toolchain_core::{ctx, rivet_api::apis}; use global_error::prelude::*; use serde::Serialize; diff --git a/cli/src/commands/sidekick/get_lobbies_link.rs b/rivet-cli/src/commands/sidekick/get_lobbies_link.rs similarity index 86% rename from cli/src/commands/sidekick/get_lobbies_link.rs rename to rivet-cli/src/commands/sidekick/get_lobbies_link.rs index 390407c4..2e2cbd71 100644 --- a/cli/src/commands/sidekick/get_lobbies_link.rs +++ b/rivet-cli/src/commands/sidekick/get_lobbies_link.rs @@ -18,7 +18,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { let mut url = get_namespace_url(self.namespace.clone(), ctx).await?; url.path_segments_mut().unwrap().push("lobbies"); Ok(Output { diff --git a/cli/src/commands/sidekick/get_logs_link.rs b/rivet-cli/src/commands/sidekick/get_logs_link.rs similarity index 86% rename from cli/src/commands/sidekick/get_logs_link.rs rename to rivet-cli/src/commands/sidekick/get_logs_link.rs index 154269b3..93875690 100644 --- a/cli/src/commands/sidekick/get_logs_link.rs +++ b/rivet-cli/src/commands/sidekick/get_logs_link.rs @@ -18,7 +18,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { let mut url = get_namespace_url(self.namespace.clone(), ctx).await?; url.path_segments_mut().unwrap().push("logs"); Ok(Output { diff --git a/cli/src/commands/sidekick/get_namespace_dev_token.rs b/rivet-cli/src/commands/sidekick/get_namespace_dev_token.rs similarity index 86% rename from cli/src/commands/sidekick/get_namespace_dev_token.rs rename to rivet-cli/src/commands/sidekick/get_namespace_dev_token.rs index c3ee7d6a..7f71894d 100644 --- a/cli/src/commands/sidekick/get_namespace_dev_token.rs +++ b/rivet-cli/src/commands/sidekick/get_namespace_dev_token.rs @@ -23,7 +23,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { let token = commands::token::create::dev::execute( ctx, &commands::token::create::dev::Opts { diff --git a/cli/src/commands/sidekick/get_namespace_pub_token.rs b/rivet-cli/src/commands/sidekick/get_namespace_pub_token.rs similarity index 87% rename from cli/src/commands/sidekick/get_namespace_pub_token.rs rename to rivet-cli/src/commands/sidekick/get_namespace_pub_token.rs index c1c8c7b8..50f27255 100644 --- a/cli/src/commands/sidekick/get_namespace_pub_token.rs +++ b/rivet-cli/src/commands/sidekick/get_namespace_pub_token.rs @@ -23,7 +23,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { let token = commands::token::create::pub_ns::execute( ctx, &commands::token::create::pub_ns::Opts { diff --git a/cli/src/commands/sidekick/get_versions_link.rs b/rivet-cli/src/commands/sidekick/get_versions_link.rs similarity index 86% rename from cli/src/commands/sidekick/get_versions_link.rs rename to rivet-cli/src/commands/sidekick/get_versions_link.rs index e23162cf..52e6dc78 100644 --- a/cli/src/commands/sidekick/get_versions_link.rs +++ b/rivet-cli/src/commands/sidekick/get_versions_link.rs @@ -18,7 +18,7 @@ pub struct Output { impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult { let mut url = get_namespace_url(self.namespace.clone(), ctx).await?; url.path_segments_mut().unwrap().push("versions"); Ok(Output { diff --git a/cli/src/commands/sidekick/kill_process.rs b/rivet-cli/src/commands/sidekick/kill_process.rs similarity index 100% rename from cli/src/commands/sidekick/kill_process.rs rename to rivet-cli/src/commands/sidekick/kill_process.rs diff --git a/cli/src/commands/sidekick/mod.rs b/rivet-cli/src/commands/sidekick/mod.rs similarity index 99% rename from cli/src/commands/sidekick/mod.rs rename to rivet-cli/src/commands/sidekick/mod.rs index f2360422..d2e713bb 100644 --- a/cli/src/commands/sidekick/mod.rs +++ b/rivet-cli/src/commands/sidekick/mod.rs @@ -149,7 +149,7 @@ impl SubCommand { pub async fn execute( &self, - ctx: &cli_core::Ctx, + ctx: &toolchain_core::Ctx, _term: &Term, show_terminal: bool, inside_terminal: bool, diff --git a/cli/src/commands/sidekick/show_term.rs b/rivet-cli/src/commands/sidekick/show_term.rs similarity index 100% rename from cli/src/commands/sidekick/show_term.rs rename to rivet-cli/src/commands/sidekick/show_term.rs diff --git a/cli/src/commands/sidekick/unlink.rs b/rivet-cli/src/commands/sidekick/unlink.rs similarity index 78% rename from cli/src/commands/sidekick/unlink.rs rename to rivet-cli/src/commands/sidekick/unlink.rs index 5bd190d9..ad965e24 100644 --- a/cli/src/commands/sidekick/unlink.rs +++ b/rivet-cli/src/commands/sidekick/unlink.rs @@ -15,7 +15,7 @@ pub struct Output {} impl SideKickHandler for Output {} impl Opts { - pub async fn execute(&self, _ctx: &cli_core::Ctx) -> GlobalResult { + pub async fn execute(&self, _ctx: &toolchain_core::Ctx) -> GlobalResult { commands::unlink::unlink().await?; Ok(Output {}) diff --git a/cli/src/commands/sidekick/util.rs b/rivet-cli/src/commands/sidekick/util.rs similarity index 89% rename from cli/src/commands/sidekick/util.rs rename to rivet-cli/src/commands/sidekick/util.rs index ed0569c3..56cf9001 100644 --- a/cli/src/commands/sidekick/util.rs +++ b/rivet-cli/src/commands/sidekick/util.rs @@ -3,7 +3,7 @@ use url::Url; pub async fn get_namespace_url( namespace: String, - ctx: &std::sync::Arc, + ctx: &std::sync::Arc, ) -> GlobalResult { // Build the URL from the game ID and the namespace let mut url = unwrap!(Url::parse(&format!( diff --git a/cli/src/commands/sidekick/wait_for_login.rs b/rivet-cli/src/commands/sidekick/wait_for_login.rs similarity index 95% rename from cli/src/commands/sidekick/wait_for_login.rs rename to rivet-cli/src/commands/sidekick/wait_for_login.rs index f7720375..20892e09 100644 --- a/cli/src/commands/sidekick/wait_for_login.rs +++ b/rivet-cli/src/commands/sidekick/wait_for_login.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::{ctx, rivet_api::apis}; +use toolchain_core::{ctx, rivet_api::apis}; use global_error::prelude::*; use serde::Serialize; @@ -58,7 +58,7 @@ impl Opts { }; // Create new context - let new_ctx = cli_core::ctx::init( + let new_ctx = toolchain_core::ctx::init( api_endpoint, // Exclude overridden access token to check the token token.clone(), diff --git a/cli/src/commands/token/create/dev.rs b/rivet-cli/src/commands/token/create/dev.rs similarity index 93% rename from cli/src/commands/token/create/dev.rs rename to rivet-cli/src/commands/token/create/dev.rs index 9be75c48..e5f79618 100644 --- a/cli/src/commands/token/create/dev.rs +++ b/rivet-cli/src/commands/token/create/dev.rs @@ -1,7 +1,7 @@ use std::io::Write; use clap::Parser; -use cli_core::rivet_api::{apis, models}; +use toolchain_core::rivet_api::{apis, models}; use global_error::prelude::*; use serde::Serialize; use std::collections::HashMap; @@ -16,7 +16,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { let output = execute(ctx, self).await?; print!("{}", output.token); @@ -32,7 +32,7 @@ pub struct Output { pub token: String, } -pub async fn execute(ctx: &cli_core::Ctx, opts: &Opts) -> GlobalResult { +pub async fn execute(ctx: &toolchain_core::Ctx, opts: &Opts) -> GlobalResult { let ns_name_id = opts .namespace .as_ref() @@ -183,7 +183,7 @@ async fn read_config( } } -async fn fetch_namespace_id(ctx: &cli_core::Ctx, ns_name_id: &str) -> GlobalResult { +async fn fetch_namespace_id(ctx: &toolchain_core::Ctx, ns_name_id: &str) -> GlobalResult { let game_res = unwrap!( apis::cloud_games_api::cloud_games_get_game_by_id( &ctx.openapi_config_cloud, diff --git a/cli/src/commands/token/create/mod.rs b/rivet-cli/src/commands/token/create/mod.rs similarity index 88% rename from cli/src/commands/token/create/mod.rs rename to rivet-cli/src/commands/token/create/mod.rs index 24016af8..be8fa86b 100644 --- a/cli/src/commands/token/create/mod.rs +++ b/rivet-cli/src/commands/token/create/mod.rs @@ -20,7 +20,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Development(opts) => opts.execute(ctx).await, SubCommand::Public(opts) => opts.execute(ctx).await, diff --git a/cli/src/commands/token/create/pub_ns.rs b/rivet-cli/src/commands/token/create/pub_ns.rs similarity index 86% rename from cli/src/commands/token/create/pub_ns.rs rename to rivet-cli/src/commands/token/create/pub_ns.rs index 26e4bd01..3bda09da 100644 --- a/cli/src/commands/token/create/pub_ns.rs +++ b/rivet-cli/src/commands/token/create/pub_ns.rs @@ -1,7 +1,7 @@ use std::io::Write; use clap::Parser; -use cli_core::rivet_api::apis; +use toolchain_core::rivet_api::apis; use global_error::prelude::*; use serde::Serialize; @@ -15,7 +15,7 @@ pub struct Opts { } impl Opts { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { let output = execute(ctx, self).await?; print!("{}", output.token); @@ -31,7 +31,7 @@ pub struct Output { pub token: String, } -pub async fn execute(ctx: &cli_core::Ctx, opts: &Opts) -> GlobalResult { +pub async fn execute(ctx: &toolchain_core::Ctx, opts: &Opts) -> GlobalResult { let ns_name_id = opts .namespace .as_ref() @@ -81,7 +81,7 @@ pub async fn execute(ctx: &cli_core::Ctx, opts: &Opts) -> GlobalResult { Ok(Output { token }) } -async fn fetch_namespace_id(ctx: &cli_core::Ctx, ns_name_id: &str) -> GlobalResult { +async fn fetch_namespace_id(ctx: &toolchain_core::Ctx, ns_name_id: &str) -> GlobalResult { let game_res = unwrap!( apis::cloud_games_api::cloud_games_get_game_by_id( &ctx.openapi_config_cloud, diff --git a/cli/src/commands/token/mod.rs b/rivet-cli/src/commands/token/mod.rs similarity index 78% rename from cli/src/commands/token/mod.rs rename to rivet-cli/src/commands/token/mod.rs index 1a8c9b04..ee4617d5 100644 --- a/cli/src/commands/token/mod.rs +++ b/rivet-cli/src/commands/token/mod.rs @@ -12,7 +12,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::Create { command } => command.execute(ctx).await, } diff --git a/cli/src/commands/unlink.rs b/rivet-cli/src/commands/unlink.rs similarity index 100% rename from cli/src/commands/unlink.rs rename to rivet-cli/src/commands/unlink.rs diff --git a/cli/src/commands/version.rs b/rivet-cli/src/commands/version.rs similarity index 90% rename from cli/src/commands/version.rs rename to rivet-cli/src/commands/version.rs index 68a5ece7..9a58a8f3 100644 --- a/cli/src/commands/version.rs +++ b/rivet-cli/src/commands/version.rs @@ -1,5 +1,5 @@ use clap::Parser; -use cli_core::rivet_api::apis; +use toolchain_core::rivet_api::apis; use global_error::prelude::*; use tabled::Tabled; @@ -34,7 +34,7 @@ pub enum SubCommand { } impl SubCommand { - pub async fn execute(&self, ctx: &cli_core::Ctx) -> GlobalResult<()> { + pub async fn execute(&self, ctx: &toolchain_core::Ctx) -> GlobalResult<()> { match self { SubCommand::List => { let game_res = unwrap!( @@ -110,7 +110,7 @@ impl SubCommand { } /// Prints information about a game version -async fn print_version(ctx: &cli_core::Ctx, version_id: &str) -> GlobalResult<()> { +async fn print_version(ctx: &toolchain_core::Ctx, version_id: &str) -> GlobalResult<()> { let version_res = unwrap!( apis::cloud_games_versions_api::cloud_games_versions_get_game_version_by_id( &ctx.openapi_config_cloud, @@ -126,7 +126,7 @@ async fn print_version(ctx: &cli_core::Ctx, version_id: &str) -> GlobalResult<() Ok(()) } -pub fn dashboard_url(ctx: &cli_core::Ctx, game_id: &str, version_id: &str) -> String { +pub fn dashboard_url(ctx: &toolchain_core::Ctx, game_id: &str, version_id: &str) -> String { format!( "{}/developer/games/{game_id}/versions/{version_id}", ctx.bootstrap.origins.hub, diff --git a/cli/src/lib.rs b/rivet-cli/src/lib.rs similarity index 100% rename from cli/src/lib.rs rename to rivet-cli/src/lib.rs diff --git a/cli/src/main.rs b/rivet-cli/src/main.rs similarity index 99% rename from cli/src/main.rs rename to rivet-cli/src/main.rs index e2a76c58..8dc80a5c 100644 --- a/cli/src/main.rs +++ b/rivet-cli/src/main.rs @@ -404,7 +404,7 @@ async fn read_opts() -> GlobalResult { async fn build_ctx( api_endpoint: Option, token: Option, -) -> GlobalResult { +) -> GlobalResult { let Some(token) = token else { if !os::is_linux_and_root() { rivet_term::status::error("Unauthenticated", "Run `rivet init` to authenticate"); @@ -420,7 +420,7 @@ async fn build_ctx( bail!("rivet token not found") }; - Ok(cli_core::ctx::init(api_endpoint, token).await?) + Ok(toolchain_core::ctx::init(api_endpoint, token).await?) } async fn opengb_passthrough() -> GlobalResult { diff --git a/cli/src/util/api.rs b/rivet-cli/src/util/api.rs similarity index 100% rename from cli/src/util/api.rs rename to rivet-cli/src/util/api.rs diff --git a/cli/src/util/cmd.rs b/rivet-cli/src/util/cmd.rs similarity index 97% rename from cli/src/util/cmd.rs rename to rivet-cli/src/util/cmd.rs index 06fed68d..10fdda14 100644 --- a/cli/src/util/cmd.rs +++ b/rivet-cli/src/util/cmd.rs @@ -42,7 +42,7 @@ pub struct RunWithRivetOpts<'a> { } /// Runs a command with `run_command` and populates `RIVET_API_ENDPOINT` and `RIVET_TOKEN` env vars. -pub async fn run_with_rivet(ctx: &cli_core::Ctx, opts: RunWithRivetOpts<'_>) -> GlobalResult<()> { +pub async fn run_with_rivet(ctx: &toolchain_core::Ctx, opts: RunWithRivetOpts<'_>) -> GlobalResult<()> { // Generate token let token = match opts.token { RunWithRivetToken::ThisMachine => { diff --git a/cli/src/util/download.rs b/rivet-cli/src/util/download.rs similarity index 100% rename from cli/src/util/download.rs rename to rivet-cli/src/util/download.rs diff --git a/cli/src/util/global_config.rs b/rivet-cli/src/util/global_config.rs similarity index 99% rename from cli/src/util/global_config.rs rename to rivet-cli/src/util/global_config.rs index 4232fa7d..0cb75173 100644 --- a/cli/src/util/global_config.rs +++ b/rivet-cli/src/util/global_config.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, path::PathBuf}; -use cli_core::rivet_api::models; +use toolchain_core::rivet_api::models; use global_error::prelude::*; use serde::{Deserialize, Serialize}; use tokio::{ diff --git a/cli/src/util/lz4.rs b/rivet-cli/src/util/lz4.rs similarity index 100% rename from cli/src/util/lz4.rs rename to rivet-cli/src/util/lz4.rs diff --git a/cli/src/util/mod.rs b/rivet-cli/src/util/mod.rs similarity index 100% rename from cli/src/util/mod.rs rename to rivet-cli/src/util/mod.rs diff --git a/cli/src/util/os.rs b/rivet-cli/src/util/os.rs similarity index 100% rename from cli/src/util/os.rs rename to rivet-cli/src/util/os.rs diff --git a/cli/src/util/paths.rs b/rivet-cli/src/util/paths.rs similarity index 100% rename from cli/src/util/paths.rs rename to rivet-cli/src/util/paths.rs diff --git a/cli/src/util/show_term.rs b/rivet-cli/src/util/show_term.rs similarity index 100% rename from cli/src/util/show_term.rs rename to rivet-cli/src/util/show_term.rs diff --git a/cli/src/util/struct_fmt.rs b/rivet-cli/src/util/struct_fmt.rs similarity index 100% rename from cli/src/util/struct_fmt.rs rename to rivet-cli/src/util/struct_fmt.rs diff --git a/cli/src/util/telemetry.rs b/rivet-cli/src/util/telemetry.rs similarity index 99% rename from cli/src/util/telemetry.rs rename to rivet-cli/src/util/telemetry.rs index dbcdc034..da67c1a4 100644 --- a/cli/src/util/telemetry.rs +++ b/rivet-cli/src/util/telemetry.rs @@ -1,4 +1,4 @@ -use cli_core::ctx; +use toolchain_core::ctx; use global_error::prelude::*; use serde_json::json; use sysinfo::System; diff --git a/cli/src/util/term.rs b/rivet-cli/src/util/term.rs similarity index 100% rename from cli/src/util/term.rs rename to rivet-cli/src/util/term.rs diff --git a/cli/src/util/text.rs b/rivet-cli/src/util/text.rs similarity index 100% rename from cli/src/util/text.rs rename to rivet-cli/src/util/text.rs diff --git a/cli/src/util/upload.rs b/rivet-cli/src/util/upload.rs similarity index 99% rename from cli/src/util/upload.rs rename to rivet-cli/src/util/upload.rs index f15650cb..7fae88e7 100644 --- a/cli/src/util/upload.rs +++ b/rivet-cli/src/util/upload.rs @@ -3,7 +3,7 @@ use std::{ time::{Duration, Instant}, }; -use cli_core::rivet_api::models; +use toolchain_core::rivet_api::models; use console::style; use futures_util::stream::StreamExt; use global_error::prelude::*; diff --git a/cli/src/util/users.rs b/rivet-cli/src/util/users.rs similarity index 100% rename from cli/src/util/users.rs rename to rivet-cli/src/util/users.rs diff --git a/cli/src/util/version_config.rs b/rivet-cli/src/util/version_config.rs similarity index 98% rename from cli/src/util/version_config.rs rename to rivet-cli/src/util/version_config.rs index 2c463078..26ab23ac 100644 --- a/cli/src/util/version_config.rs +++ b/rivet-cli/src/util/version_config.rs @@ -3,7 +3,7 @@ use std::{ str::FromStr, }; -use cli_core::rivet_api::models; +use toolchain_core::rivet_api::models; use global_error::prelude::*; use serde_json::json; diff --git a/cli/static/oci-bundle-config.base.json b/rivet-cli/static/oci-bundle-config.base.json similarity index 100% rename from cli/static/oci-bundle-config.base.json rename to rivet-cli/static/oci-bundle-config.base.json diff --git a/cli/tests/e2e.rs b/rivet-cli/tests/e2e.rs similarity index 100% rename from cli/tests/e2e.rs rename to rivet-cli/tests/e2e.rs diff --git a/cli/tests/static/basic/Dockerfile.test b/rivet-cli/tests/static/basic/Dockerfile.test similarity index 100% rename from cli/tests/static/basic/Dockerfile.test rename to rivet-cli/tests/static/basic/Dockerfile.test diff --git a/cli/tests/static/basic/dist/index.html b/rivet-cli/tests/static/basic/dist/index.html similarity index 100% rename from cli/tests/static/basic/dist/index.html rename to rivet-cli/tests/static/basic/dist/index.html diff --git a/cli/tests/static/basic/rivet.my-ns.yaml b/rivet-cli/tests/static/basic/rivet.my-ns.yaml similarity index 100% rename from cli/tests/static/basic/rivet.my-ns.yaml rename to rivet-cli/tests/static/basic/rivet.my-ns.yaml diff --git a/cli/tests/static/basic/rivet.yaml b/rivet-cli/tests/static/basic/rivet.yaml similarity index 100% rename from cli/tests/static/basic/rivet.yaml rename to rivet-cli/tests/static/basic/rivet.yaml diff --git a/cli/tests/static/basic/run.sh b/rivet-cli/tests/static/basic/run.sh similarity index 100% rename from cli/tests/static/basic/run.sh rename to rivet-cli/tests/static/basic/run.sh diff --git a/cli/tests/version.rs b/rivet-cli/tests/version.rs similarity index 100% rename from cli/tests/version.rs rename to rivet-cli/tests/version.rs diff --git a/cli/tpl/ci/github/foot.yml b/rivet-cli/tpl/ci/github/foot.yml similarity index 100% rename from cli/tpl/ci/github/foot.yml rename to rivet-cli/tpl/ci/github/foot.yml diff --git a/cli/tpl/ci/github/head.yml b/rivet-cli/tpl/ci/github/head.yml similarity index 100% rename from cli/tpl/ci/github/head.yml rename to rivet-cli/tpl/ci/github/head.yml diff --git a/cli/tpl/ci/github/job-cdn.yml b/rivet-cli/tpl/ci/github/job-cdn.yml similarity index 100% rename from cli/tpl/ci/github/job-cdn.yml rename to rivet-cli/tpl/ci/github/job-cdn.yml diff --git a/cli/tpl/ci/github/job-image.yml b/rivet-cli/tpl/ci/github/job-image.yml similarity index 100% rename from cli/tpl/ci/github/job-image.yml rename to rivet-cli/tpl/ci/github/job-image.yml diff --git a/cli/tpl/graphics/logo.txt b/rivet-cli/tpl/graphics/logo.txt similarity index 100% rename from cli/tpl/graphics/logo.txt rename to rivet-cli/tpl/graphics/logo.txt diff --git a/cli/tpl/unreal_config/.dockerignore b/rivet-cli/tpl/unreal_config/.dockerignore similarity index 100% rename from cli/tpl/unreal_config/.dockerignore rename to rivet-cli/tpl/unreal_config/.dockerignore diff --git a/cli/tpl/unreal_config/config-prod.yaml b/rivet-cli/tpl/unreal_config/config-prod.yaml similarity index 100% rename from cli/tpl/unreal_config/config-prod.yaml rename to rivet-cli/tpl/unreal_config/config-prod.yaml diff --git a/cli/tpl/unreal_config/config.yaml b/rivet-cli/tpl/unreal_config/config.yaml similarity index 100% rename from cli/tpl/unreal_config/config.yaml rename to rivet-cli/tpl/unreal_config/config.yaml diff --git a/cli/tpl/unreal_config/server.debug.Dockerfile b/rivet-cli/tpl/unreal_config/server.debug.Dockerfile similarity index 100% rename from cli/tpl/unreal_config/server.debug.Dockerfile rename to rivet-cli/tpl/unreal_config/server.debug.Dockerfile diff --git a/cli/tpl/unreal_config/server.development.Dockerfile b/rivet-cli/tpl/unreal_config/server.development.Dockerfile similarity index 100% rename from cli/tpl/unreal_config/server.development.Dockerfile rename to rivet-cli/tpl/unreal_config/server.development.Dockerfile diff --git a/cli/tpl/unreal_config/server.shipping.Dockerfile b/rivet-cli/tpl/unreal_config/server.shipping.Dockerfile similarity index 100% rename from cli/tpl/unreal_config/server.shipping.Dockerfile rename to rivet-cli/tpl/unreal_config/server.shipping.Dockerfile diff --git a/core/Cargo.toml b/rivet-toolchain-core/Cargo.toml similarity index 96% rename from core/Cargo.toml rename to rivet-toolchain-core/Cargo.toml index ef4874c1..fea74efc 100644 --- a/core/Cargo.toml +++ b/rivet-toolchain-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "rivet-cli-core" +name = "rivet-toolchain-core" version = "0.0.1" authors = ["Rivet Gaming, LLC "] edition = "2018" diff --git a/core/build.rs b/rivet-toolchain-core/build.rs similarity index 100% rename from core/build.rs rename to rivet-toolchain-core/build.rs diff --git a/core/src/ctx.rs b/rivet-toolchain-core/src/ctx.rs similarity index 100% rename from core/src/ctx.rs rename to rivet-toolchain-core/src/ctx.rs diff --git a/core/src/error.rs b/rivet-toolchain-core/src/error.rs similarity index 100% rename from core/src/error.rs rename to rivet-toolchain-core/src/error.rs diff --git a/core/src/lib.rs b/rivet-toolchain-core/src/lib.rs similarity index 100% rename from core/src/lib.rs rename to rivet-toolchain-core/src/lib.rs