Use workspace version, add clap CLI to MCP server
- Define version in workspace.package, inherit in all crates - Rename MCP binary from sqlx-record-expert to sqlx-record-mcp - Add clap for --version and --help support Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
44ac78d67e
commit
6c56231003
|
|
@ -1,8 +1,12 @@
|
|||
[package]
|
||||
name = "sqlx-record"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Entity CRUD and change tracking for SQL databases with SQLx"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
description = "Entity CRUD and change tracking for SQL databases with SQLx"
|
||||
|
||||
[dependencies]
|
||||
sqlx-record-derive = { path = "sqlx-record-derive", optional = true }
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
[package]
|
||||
name = "sqlx-record-mcp"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "MCP server providing sqlx-record documentation and code generation"
|
||||
|
||||
[[bin]]
|
||||
name = "sqlx-record-expert"
|
||||
name = "sqlx-record-mcp"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
use clap::Parser;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use std::io::{self, BufRead, Write};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(name = "sqlx-record-mcp")]
|
||||
#[command(version, about = "MCP server for sqlx-record documentation and code generation")]
|
||||
struct Args {}
|
||||
|
||||
// ============================================================================
|
||||
// MCP Protocol Types
|
||||
// ============================================================================
|
||||
|
|
@ -1950,6 +1956,8 @@ fn handle_read_resource(params: &Value) -> Value {
|
|||
// ============================================================================
|
||||
|
||||
fn main() {
|
||||
let _args = Args::parse();
|
||||
|
||||
let stdin = io::stdin();
|
||||
let mut stdout = io::stdout();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "sqlx-record-ctl"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "CLI tool for managing sqlx-record audit tables"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "sqlx-record-derive"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
description = "Derive macros for sqlx-record"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
Loading…
Reference in New Issue