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]
|
[package]
|
||||||
name = "sqlx-record"
|
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"
|
version = "0.3.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Entity CRUD and change tracking for SQL databases with SQLx"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sqlx-record-derive = { path = "sqlx-record-derive", optional = true }
|
sqlx-record-derive = { path = "sqlx-record-derive", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sqlx-record-mcp"
|
name = "sqlx-record-mcp"
|
||||||
version = "0.3.0"
|
version.workspace = true
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
description = "MCP server providing sqlx-record documentation and code generation"
|
description = "MCP server providing sqlx-record documentation and code generation"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "sqlx-record-expert"
|
name = "sqlx-record-mcp"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
clap = { version = "4", features = ["derive"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
|
use clap::Parser;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
use std::io::{self, BufRead, Write};
|
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
|
// MCP Protocol Types
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
@ -1950,6 +1956,8 @@ fn handle_read_resource(params: &Value) -> Value {
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let _args = Args::parse();
|
||||||
|
|
||||||
let stdin = io::stdin();
|
let stdin = io::stdin();
|
||||||
let mut stdout = io::stdout();
|
let mut stdout = io::stdout();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sqlx-record-ctl"
|
name = "sqlx-record-ctl"
|
||||||
version = "0.3.0"
|
version.workspace = true
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
description = "CLI tool for managing sqlx-record audit tables"
|
description = "CLI tool for managing sqlx-record audit tables"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sqlx-record-derive"
|
name = "sqlx-record-derive"
|
||||||
version = "0.3.0"
|
version.workspace = true
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
description = "Derive macros for sqlx-record"
|
description = "Derive macros for sqlx-record"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue