chore: rebrand project to crank

This commit is contained in:
a.tolmachev
2026-03-28 00:58:56 +03:00
parent 6821d0c64a
commit 26335e8d9b
101 changed files with 550 additions and 538 deletions
+17 -17
View File
@@ -5,7 +5,7 @@ mod session;
use std::{env, net::SocketAddr, time::Duration};
use mcpaas_registry::PostgresRegistry;
use crank_registry::PostgresRegistry;
use tokio::net::TcpListener;
use tracing::info;
@@ -15,15 +15,15 @@ use crate::app::build_app;
async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt()
.with_env_filter(
env::var("MCPAAS_LOG_LEVEL")
env::var("CRANK_LOG_LEVEL")
.unwrap_or_else(|_| "mcp_server=info,tower_http=info".into()),
)
.init();
let database_url = env::var("MCPAAS_DATABASE_URL")?;
let bind_addr = env::var("MCPAAS_MCP_BIND").unwrap_or_else(|_| "0.0.0.0:3002".into());
let public_base_url = env::var("MCPAAS_PUBLIC_BASE_URL").ok();
let refresh_interval = env::var("MCPAAS_MCP_REFRESH_MS")
let database_url = env::var("CRANK_DATABASE_URL")?;
let bind_addr = env::var("CRANK_MCP_BIND").unwrap_or_else(|_| "0.0.0.0:3002".into());
let public_base_url = env::var("CRANK_PUBLIC_BASE_URL").ok();
let refresh_interval = env::var("CRANK_MCP_REFRESH_MS")
.ok()
.and_then(|value| value.parse::<u64>().ok())
.map(Duration::from_millis)
@@ -49,14 +49,14 @@ mod tests {
};
use axum::{Json, Router, http::header, routing::post};
use mcpaas_adapter_grpc::test_support as grpc_test_support;
use mcpaas_core::{
use crank_adapter_grpc::test_support as grpc_test_support;
use crank_core::{
DescriptorId, ExecutionConfig, GraphqlOperationType, GraphqlTarget, GrpcTarget, HttpMethod,
Operation, OperationId, OperationStatus, Protocol, RestTarget, Target, ToolDescription,
};
use mcpaas_mapping::{MappingRule, MappingSet};
use mcpaas_registry::{PostgresRegistry, PublishRequest};
use mcpaas_schema::{Schema, SchemaKind};
use crank_mapping::{MappingRule, MappingSet};
use crank_registry::{PostgresRegistry, PublishRequest};
use crank_schema::{Schema, SchemaKind};
use serde_json::{Value, json};
use sqlx::{Executor, postgres::PgPoolOptions};
use tokio::net::TcpListener;
@@ -86,7 +86,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -153,7 +153,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -207,7 +207,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -244,7 +244,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry,
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -297,7 +297,7 @@ mod tests {
let base_url = spawn_mcp_server(build_app(
registry.clone(),
Duration::from_millis(0),
Some("https://rmcp.example.com".to_owned()),
Some("https://crank.example.com".to_owned()),
))
.await;
let client = reqwest::Client::new();
@@ -479,7 +479,7 @@ mod tests {
async fn test_registry() -> PostgresRegistry {
let database_url = env::var("TEST_DATABASE_URL")
.unwrap_or_else(|_| "postgres://rmcp:rmcp@127.0.0.1:5432/rmcp".to_owned());
.unwrap_or_else(|_| "postgres://crank:crank@127.0.0.1:5432/crank".to_owned());
let admin_pool = PgPoolOptions::new()
.max_connections(1)
.connect(&database_url)