From fc9b2c3e00bab4c22b03bc20aaacfcbd31200800 Mon Sep 17 00:00:00 2001 From: Reboot-Codes Date: Wed, 30 Apr 2025 21:09:58 -0700 Subject: [PATCH] Damn. Trailing. Commas pt3 (moving to serde_json_lenient) --- clover-hub/src/server/warehouse/mod.rs | 4 ++-- clover-hub/src/server/warehouse/repos/impls.rs | 4 ++-- clover-hub/src/server/warehouse/repos/mod.rs | 4 ++-- manifest.clover.jsonc => manifest.clover.json | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename manifest.clover.jsonc => manifest.clover.json (52%) diff --git a/clover-hub/src/server/warehouse/mod.rs b/clover-hub/src/server/warehouse/mod.rs index 7d0f460..a703392 100644 --- a/clover-hub/src/server/warehouse/mod.rs +++ b/clover-hub/src/server/warehouse/mod.rs @@ -75,7 +75,7 @@ pub async fn setup_warehouse(data_dir: String, store: Arc) -> Re let warehouse_path = OsPath::from(data_dir.clone()); // Read configuration and load defaults otherwise - let config_file_path = warehouse_path.join("/config.jsonc"); + let config_file_path = warehouse_path.join("/config.json"); match err { Some(_) => {} None => { @@ -279,7 +279,7 @@ pub async fn warehouse_main( // TODO: Lock db and clean up when done. debug!("Writing Config File..."); let config = store.config.lock().await; - match fs::File::open(config.data_dir.join("/config.jsonc")).await { + match fs::File::open(config.data_dir.join("/config.json")).await { Ok(mut config_file) => { debug!("Config file opened!"); diff --git a/clover-hub/src/server/warehouse/repos/impls.rs b/clover-hub/src/server/warehouse/repos/impls.rs index 4d1ac2f..92a33eb 100644 --- a/clover-hub/src/server/warehouse/repos/impls.rs +++ b/clover-hub/src/server/warehouse/repos/impls.rs @@ -394,7 +394,7 @@ where match resolve_list_entry(hash_map, resolution_ctx.clone(), repo_dir_path.clone()).await { Ok(list) => { - debug!("serde_jsonc::from_str(): {:#?}", (&list)); + debug!("serde_json_lenient::from_str(): {:#?}", (&list)); entries = OptionalStrTHashMap::Some(list); } @@ -422,7 +422,7 @@ where &res_str, ) { Ok(hash_map) => { - debug!("serde_jsonc::from_str(): {:#?}", hash_map.clone()); + debug!("serde_json_lenient::from_str(): {:#?}", hash_map.clone()); match resolve_list_entry( hash_map, diff --git a/clover-hub/src/server/warehouse/repos/mod.rs b/clover-hub/src/server/warehouse/repos/mod.rs index b6d1a49..7230dba 100644 --- a/clover-hub/src/server/warehouse/repos/mod.rs +++ b/clover-hub/src/server/warehouse/repos/mod.rs @@ -407,7 +407,7 @@ pub async fn resolve_entry_value( let mut file_path = OsPath::from(entry.path()); let cap = match import_captures.name("cap") { Some(val) => val.as_str(), - None => "/manifest.clover.jsonc", + None => "/manifest.clover.json", }; debug!( @@ -690,7 +690,7 @@ pub async fn download_repo_updates( if (repo_err == None) && (err == None) { // Build manifest object and load it into the store. - let manifest_path = repo_path.join("/manifest.clover.jsonc"); + let manifest_path = repo_path.join("/manifest.clover.json"); if manifest_path.exists() { match fs::File::open(manifest_path.clone()).await { Ok(mut manifest_file) => { diff --git a/manifest.clover.jsonc b/manifest.clover.json similarity index 52% rename from manifest.clover.jsonc rename to manifest.clover.json index d043299..0839763 100644 --- a/manifest.clover.jsonc +++ b/manifest.clover.json @@ -1,5 +1,5 @@ { "version": "1.0.0", "base": "com.reboot-codes.clover.CORE", - "directory": "@import('./core/manifest.clover.jsonc')" -} \ No newline at end of file + "directory": "@import('./core/manifest.clover.json')", +} -- 2.51.2