MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / enrich_status

Function enrich_status

packages/server/src/camera.rs:418–435  ·  view source on GitHub ↗
(udid: &str, status: &mut Value)

Source from the content-addressed store, hash-verified

416}
417
418fn enrich_status(udid: &str, status: &mut Value) {
419 let Some(object) = status.as_object_mut() else {
420 return;
421 };
422 object.insert("udid".to_owned(), Value::String(udid.to_owned()));
423 if let Some(pid) = object
424 .get("processId")
425 .and_then(Value::as_u64)
426 .and_then(|value| u32::try_from(value).ok())
427 {
428 object.insert("daemonPid".to_owned(), json!(pid));
429 }
430 object.insert("bundleIds".to_owned(), json!(read_injected_bundles(udid)));
431 object.insert(
432 "appLogPath".to_owned(),
433 Value::String(camera_app_log_file(udid).display().to_string()),
434 );
435}
436
437fn record_injected_bundle(udid: &str, bundle_id: &str) -> Result<(), AppError> {
438 let mut bundle_ids = read_injected_bundles(udid);

Callers 3

start_cameraFunction · 0.85
switch_cameraFunction · 0.85
camera_statusFunction · 0.85

Calls 3

camera_app_log_fileFunction · 0.85
insertMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected