From e30dfd5e5abb96cdc89b80f1d085466e55c347e0 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 3 Dec 2025 11:38:07 +0000 Subject: remove depricated audit mode label ci / production ~> isolated / shared --- grasp-audit/QUICK_START.md | 16 +++++++++++----- grasp-audit/src/audit.rs | 12 ------------ grasp-audit/src/bin/grasp-audit.rs | 12 ++++++++---- 3 files changed, 19 insertions(+), 21 deletions(-) (limited to 'grasp-audit') diff --git a/grasp-audit/QUICK_START.md b/grasp-audit/QUICK_START.md index d4ee494..cb6d8a7 100644 --- a/grasp-audit/QUICK_START.md +++ b/grasp-audit/QUICK_START.md @@ -108,21 +108,21 @@ use grasp_audit::*; #[tokio::main] async fn main() -> Result<()> { // Create audit client - let config = AuditConfig::ci(); + let config = AuditConfig::isolated(); let client = AuditClient::new("ws://localhost:7000", config).await?; - + // Run smoke tests let results = specs::Nip01SmokeTests::run_all(&client).await; - + // Print results results.print_report(); - + // Check if passed if !results.all_passed() { eprintln!("Some tests failed!"); std::process::exit(1); } - + Ok(()) } ``` @@ -134,17 +134,20 @@ async fn main() -> Result<()> { **Error:** `linker 'cc' not found` **Solution (NixOS):** + ```bash nix develop # Use the provided flake.nix ``` **Solution (Other Linux):** + ```bash sudo apt-get install build-essential # Debian/Ubuntu sudo yum install gcc # RedHat/CentOS ``` **Solution (macOS):** + ```bash xcode-select --install ``` @@ -154,6 +157,7 @@ xcode-select --install **Error:** `Failed to connect to relay` **Solutions:** + 1. Make sure a relay is running at the specified URL 2. Check firewall settings 3. Try a different relay URL @@ -164,6 +168,7 @@ xcode-select --install **Error:** Tests fail with timeout **Solutions:** + 1. Increase timeout in test code 2. Check relay is responding (try with `websocat`) 3. Check network connectivity @@ -216,6 +221,7 @@ xcode-select --install ## Support For issues or questions: + 1. Check the documentation in this directory 2. Review the examples 3. Check the test code for usage patterns diff --git a/grasp-audit/src/audit.rs b/grasp-audit/src/audit.rs index 713c948..0a4df42 100644 --- a/grasp-audit/src/audit.rs +++ b/grasp-audit/src/audit.rs @@ -68,18 +68,6 @@ impl AuditConfig { } } - /// Alias for isolated() - for backwards compatibility - #[deprecated(since = "0.2.0", note = "Use isolated() instead")] - pub fn ci() -> Self { - Self::isolated() - } - - /// Alias for shared() - for backwards compatibility - #[deprecated(since = "0.2.0", note = "Use shared() instead")] - pub fn production() -> Self { - Self::shared() - } - /// Create config with custom run ID pub fn with_run_id(run_id: String, mode: AuditMode) -> Self { Self { diff --git a/grasp-audit/src/bin/grasp-audit.rs b/grasp-audit/src/bin/grasp-audit.rs index 0d88bce..08a92c7 100644 --- a/grasp-audit/src/bin/grasp-audit.rs +++ b/grasp-audit/src/bin/grasp-audit.rs @@ -56,14 +56,18 @@ async fn main() -> Result<()> { spec, git_data_dir, } => { - #[allow(deprecated)] let mut config = match mode.as_str() { "shared" => AuditConfig::shared(), "isolated" => AuditConfig::isolated(), // Backwards compatibility aliases - "ci" => AuditConfig::ci(), - "production" => AuditConfig::production(), - _ => return Err(anyhow!("Invalid mode: {}. Use 'shared' or 'isolated'", mode)), + "ci" => AuditConfig::isolated(), + "production" => AuditConfig::shared(), + _ => { + return Err(anyhow!( + "Invalid mode: {}. Use 'shared' or 'isolated'", + mode + )) + } }; // Audit needs to create events to test the relay, so disable read-only mode -- cgit v1.2.3