Reduce output duplication and add install scripts

This commit is contained in:
2026-06-09 05:44:42 +00:00
parent 9f29755f0a
commit 70e3dd3cc5
10 changed files with 149 additions and 47 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ pub fn handle_account(sub: &AccountCommands) {
.unwrap_or_else(|| serde_json::json!([])),
),
],
value,
serde_json::Value::Null,
)
);
}
+2 -2
View File
@@ -52,7 +52,7 @@ pub fn handle_cache(sub: &CacheCommands) {
serde_json::json!(status.namespaces),
),
],
serde_json::json!(status),
serde_json::Value::Null,
)
),
Err(err) => eprintln!(
@@ -106,7 +106,7 @@ pub fn handle_cache(sub: &CacheCommands) {
serde_json::json!(reports),
),
],
serde_json::json!(reports),
serde_json::Value::Null,
)
);
}
+4 -10
View File
@@ -344,7 +344,7 @@ fn print_corp_snapshot(
serde_json::json!(snapshot.meta.listed_count),
),
],
serde_json::json!(snapshot.meta),
serde_json::Value::Null,
)
);
}
@@ -505,7 +505,7 @@ fn print_disclosures(
),
crate::core::output::field("disclosures", "조회된 공시 목록", list),
],
value,
serde_json::Value::Null,
)
);
}
@@ -568,7 +568,7 @@ fn print_document(value: document::DartDocument) {
serde_json::json!(value.truncated),
),
],
serde_json::json!(value),
serde_json::Value::Null,
)
);
}
@@ -630,13 +630,7 @@ fn print_show(
serde_json::json!(document),
),
],
serde_json::json!({
"query": query,
"resolved": resolved,
"selected_disclosure": selected,
"disclosures": disclosures_value,
"document": document,
}),
serde_json::Value::Null,
)
);
}
+2 -2
View File
@@ -100,7 +100,7 @@ fn handle_market_overview(symbol: &str) {
.unwrap_or_else(|| serde_json::json!({})),
),
],
value,
serde_json::Value::Null,
)
);
}
@@ -194,7 +194,7 @@ fn handle_market_history(command: &MarketHistoryCommand) {
.unwrap_or_else(|| serde_json::json!({})),
),
],
value,
serde_json::Value::Null,
)
);
}
+2 -2
View File
@@ -145,7 +145,7 @@ fn print_order_result(command: &str, description: &str, json: &str) {
.unwrap_or_else(|| serde_json::json!({})),
),
],
value,
serde_json::Value::Null,
)
);
}
@@ -199,7 +199,7 @@ fn print_order_status_result(json: &str) {
.unwrap_or_else(|| serde_json::json!({})),
),
],
value,
serde_json::Value::Null,
)
);
}
+1 -1
View File
@@ -35,7 +35,7 @@ pub fn handle_search(query: &str) {
.unwrap_or_else(|| serde_json::json!([])),
),
],
value,
serde_json::Value::Null,
)
);
}
+4 -13
View File
@@ -171,10 +171,7 @@ pub fn handle_universe(sub: &UniverseCommands) {
serde_json::json!(page),
),
],
serde_json::json!({
"meta": snapshot.meta,
"stocks": page,
}),
serde_json::Value::Null,
)
);
}
@@ -237,10 +234,7 @@ pub fn handle_universe(sub: &UniverseCommands) {
serde_json::json!(chunks),
),
],
serde_json::json!({
"meta": snapshot.meta,
"chunks": chunks,
}),
serde_json::Value::Null,
)
);
}
@@ -296,10 +290,7 @@ pub fn handle_universe(sub: &UniverseCommands) {
serde_json::json!(report.errors),
),
],
serde_json::json!({
"meta": snapshot.meta,
"report": report,
}),
serde_json::Value::Null,
)
),
Err(err) => eprintln!(
@@ -362,7 +353,7 @@ fn print_snapshot(command: &str, description: &str, snapshot: &kind::universe::U
serde_json::json!(snapshot.meta.counts_by_market),
),
],
serde_json::json!(snapshot.meta),
serde_json::Value::Null,
)
);
}