diff --git a/Cargo.lock b/Cargo.lock index a107c12..e8759bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4562,10 +4562,12 @@ dependencies = [ "color-eyre", "lance", "lance-index", + "omnigraph-api-types", "omnigraph-compiler", + "omnigraph-config", "omnigraph-engine", "omnigraph-policy", - "omnigraph-server", + "omnigraph-queries", "predicates", "reqwest", "serde", diff --git a/crates/omnigraph-cli/Cargo.toml b/crates/omnigraph-cli/Cargo.toml index 641068e..68321dd 100644 --- a/crates/omnigraph-cli/Cargo.toml +++ b/crates/omnigraph-cli/Cargo.toml @@ -16,7 +16,9 @@ path = "src/main.rs" omnigraph = { package = "omnigraph-engine", path = "../omnigraph", version = "0.6.1" } omnigraph-compiler = { path = "../omnigraph-compiler", version = "0.6.1" } omnigraph-policy = { path = "../omnigraph-policy", version = "0.6.1" } -omnigraph-server = { path = "../omnigraph-server", version = "0.6.1" } +omnigraph-config = { path = "../omnigraph-config", version = "0.6.1" } +omnigraph-queries = { path = "../omnigraph-queries", version = "0.6.1" } +omnigraph-api-types = { path = "../omnigraph-api-types", version = "0.6.1" } clap = { workspace = true } color-eyre = { workspace = true } serde = { workspace = true } diff --git a/crates/omnigraph-cli/src/main.rs b/crates/omnigraph-cli/src/main.rs index 29b55c4..a476e24 100644 --- a/crates/omnigraph-cli/src/main.rs +++ b/crates/omnigraph-cli/src/main.rs @@ -17,7 +17,7 @@ use omnigraph_compiler::{ QueryLintSeverity, QueryLintStatus, SchemaMigrationPlan, SchemaMigrationStep, build_catalog, json_params_to_param_map, lint_query_file, }; -use omnigraph_server::api::{ +use omnigraph_api_types::{ BranchCreateOutput, BranchCreateRequest, BranchDeleteOutput, BranchListOutput, BranchMergeOutput, BranchMergeRequest, ChangeOutput, CommitListOutput, CommitOutput, ErrorOutput, ExportRequest, GraphListResponse, IngestOutput, IngestRequest, ReadOutput, @@ -25,10 +25,12 @@ use omnigraph_server::api::{ SnapshotTableOutput, commit_output, ingest_output, read_output, schema_apply_output, snapshot_payload, }; -use omnigraph_server::queries::{QueryRegistry, check, format_check_breakages}; -use omnigraph_server::{ - AliasCommand, OmnigraphConfig, PolicyAction, PolicyDecision, PolicyEngine, PolicyRequest, - PolicyTestConfig, ReadOutputFormat, graph_resource_id_for_selection, load_config, +use omnigraph_queries::{QueryRegistry, check, format_check_breakages}; +use omnigraph_config::{ + AliasCommand, OmnigraphConfig, ReadOutputFormat, graph_resource_id_for_selection, load_config, +}; +use omnigraph_policy::{ + PolicyAction, PolicyDecision, PolicyEngine, PolicyRequest, PolicyTestConfig, }; use reqwest::Method; use reqwest::header::AUTHORIZATION; @@ -1510,7 +1512,7 @@ fn resolve_alias<'a>( config: &'a OmnigraphConfig, alias_name: Option<&'a str>, expected: AliasCommand, -) -> Result> { +) -> Result> { let Some(alias_name) = alias_name else { return Ok(None); }; @@ -1614,7 +1616,7 @@ fn yaml_string(value: &str) -> String { fn inferred_config_path(uri: &str) -> Result { if uri.contains("://") { - return Ok(omnigraph_server::config::default_config_path()); + return Ok(omnigraph_config::default_config_path()); } let path = Path::new(uri); @@ -1625,7 +1627,7 @@ fn inferred_config_path(uri: &str) -> Result { } else { std::env::current_dir()?.join(path.parent().unwrap_or_else(|| Path::new("."))) }; - Ok(base.join(omnigraph_server::config::DEFAULT_CONFIG_FILE)) + Ok(base.join(omnigraph_config::DEFAULT_CONFIG_FILE)) } fn read_target_from_cli(branch: Option, snapshot: Option) -> ReadTarget { @@ -3160,7 +3162,7 @@ mod tests { normalize_bearer_token, parse_env_assignment, resolve_policy_context, resolve_cli_graph, resolve_remote_bearer_token, }; - use omnigraph_server::load_config; + use omnigraph_config::load_config; use reqwest::header::AUTHORIZATION; use serde_json::json; use tempfile::tempdir; diff --git a/crates/omnigraph-cli/src/read_format.rs b/crates/omnigraph-cli/src/read_format.rs index b205b19..8a8faee 100644 --- a/crates/omnigraph-cli/src/read_format.rs +++ b/crates/omnigraph-cli/src/read_format.rs @@ -1,7 +1,7 @@ use color_eyre::eyre::Result; -use omnigraph_server::ReadOutputFormat; -use omnigraph_server::api::ReadOutput; -use omnigraph_server::config::TableCellLayout; +use omnigraph_api_types::ReadOutput; +use omnigraph_config::ReadOutputFormat; +use omnigraph_config::TableCellLayout; use serde_json::{Map, Value}; pub struct ReadRenderOptions { @@ -275,7 +275,7 @@ fn csv_escape(value: &str) -> String { #[cfg(test)] mod tests { - use omnigraph_server::api::{ReadOutput, ReadTargetOutput}; + use omnigraph_api_types::{ReadOutput, ReadTargetOutput}; use super::*;