upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src
diff options
context:
space:
mode:
Diffstat (limited to 'grasp-audit/src')
-rw-r--r--grasp-audit/src/audit.rs12
-rw-r--r--grasp-audit/src/bin/grasp-audit.rs12
2 files changed, 8 insertions, 16 deletions
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 {
68 } 68 }
69 } 69 }
70 70
71 /// Alias for isolated() - for backwards compatibility
72 #[deprecated(since = "0.2.0", note = "Use isolated() instead")]
73 pub fn ci() -> Self {
74 Self::isolated()
75 }
76
77 /// Alias for shared() - for backwards compatibility
78 #[deprecated(since = "0.2.0", note = "Use shared() instead")]
79 pub fn production() -> Self {
80 Self::shared()
81 }
82
83 /// Create config with custom run ID 71 /// Create config with custom run ID
84 pub fn with_run_id(run_id: String, mode: AuditMode) -> Self { 72 pub fn with_run_id(run_id: String, mode: AuditMode) -> Self {
85 Self { 73 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<()> {
56 spec, 56 spec,
57 git_data_dir, 57 git_data_dir,
58 } => { 58 } => {
59 #[allow(deprecated)]
60 let mut config = match mode.as_str() { 59 let mut config = match mode.as_str() {
61 "shared" => AuditConfig::shared(), 60 "shared" => AuditConfig::shared(),
62 "isolated" => AuditConfig::isolated(), 61 "isolated" => AuditConfig::isolated(),
63 // Backwards compatibility aliases 62 // Backwards compatibility aliases
64 "ci" => AuditConfig::ci(), 63 "ci" => AuditConfig::isolated(),
65 "production" => AuditConfig::production(), 64 "production" => AuditConfig::shared(),
66 _ => return Err(anyhow!("Invalid mode: {}. Use 'shared' or 'isolated'", mode)), 65 _ => {
66 return Err(anyhow!(
67 "Invalid mode: {}. Use 'shared' or 'isolated'",
68 mode
69 ))
70 }
67 }; 71 };
68 72
69 // Audit needs to create events to test the relay, so disable read-only mode 73 // Audit needs to create events to test the relay, so disable read-only mode