mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-09 01:35:18 +02:00
refactor: drop omnigraph-cli dependency on omnigraph-server
Repoint CLI imports to the extracted crates: api DTOs -> omnigraph-api-types, QueryRegistry/check -> omnigraph-queries, config types -> omnigraph-config, and Policy* -> omnigraph-policy directly (no longer via the server re-export shim). Remove omnigraph-server from the CLI manifest. The CLI no longer pulls Axum/tower/utoipa-axum: 'cargo tree -p omnigraph-cli -i omnigraph-server' and '-i axum' both report not-in-graph. No behavior change (CLI compiles; no test churn — CLI tests import none of the moved symbols).
This commit is contained in:
parent
c51b9e1e20
commit
5ef9427c18
4 changed files with 21 additions and 15 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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 }
|
||||
|
|
|
|||
|
|
@ -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<Option<(&'a str, &'a omnigraph_server::AliasConfig)>> {
|
||||
) -> Result<Option<(&'a str, &'a omnigraph_config::AliasConfig)>> {
|
||||
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<PathBuf> {
|
||||
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<PathBuf> {
|
|||
} 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<String>, snapshot: Option<String>) -> 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;
|
||||
|
|
|
|||
|
|
@ -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::*;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue