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

Function router

packages/server/src/api/routes.rs:755–888  ·  view source on GitHub ↗
(state: AppState)

Source from the content-addressed store, hash-verified

753const SOURCE_UIKIT: &str = "in-app-inspector";
754
755pub fn router(state: AppState) -> Router {
756 Router::new()
757 .route("/api/pair", post(pair_browser))
758 .route("/api/health", get(health))
759 .route("/api/metrics", get(metrics))
760 .route(
761 "/api/stream-quality",
762 get(stream_quality).post(set_stream_quality),
763 )
764 .route(
765 "/api/client-stream-stats",
766 get(client_stream_stats).post(record_client_stream_stats),
767 )
768 .route("/api/inspector/connect", get(native_inspector_connect))
769 .route("/api/inspector/poll", get(inspector_poll))
770 .route("/api/inspector/request", post(inspector_direct_request))
771 .route("/api/inspector/response", post(inspector_response))
772 .route("/chrome-devtools-ui", get(chrome_devtools_ui_redirect))
773 .route("/chrome-devtools-ui/{*path}", get(chrome_devtools_ui_file))
774 .route("/api/metro/{port}", any(metro_proxy_root))
775 .route("/api/metro/{port}/{*path}", any(metro_proxy_asset))
776 .route("/api/metro-frontend/{port}/{*path}", any(metro_proxy_asset))
777 .route("/webkit-inspector-ui", get(webkit_inspector_ui_redirect))
778 .route(
779 "/webkit-inspector-ui/{*path}",
780 get(webkit_inspector_ui_file),
781 )
782 .route(
783 "/api/simulators",
784 get(list_simulators).post(create_simulator),
785 )
786 .route(
787 "/api/simulators/create-options",
788 get(simulator_create_options),
789 )
790 .route("/api/camera/webcams", get(camera_webcams))
791 .route("/api/simulators/{udid}/state", get(simulator_state))
792 .route("/api/simulators/{udid}/processes", get(simulator_processes))
793 .route(
794 "/api/simulators/{udid}/performance",
795 get(simulator_performance),
796 )
797 .route(
798 "/api/simulators/{udid}/processes/{pid}/performance",
799 get(simulator_process_performance),
800 )
801 .route(
802 "/api/simulators/{udid}/processes/{pid}/sample",
803 post(sample_process_stack),
804 )
805 .route("/api/simulators/{udid}/boot", post(boot_simulator))
806 .route("/api/simulators/{udid}/shutdown", post(shutdown_simulator))
807 .route("/api/simulators/{udid}/erase", post(erase_simulator))
808 .route("/api/simulators/{udid}/install", post(install_app))
809 .route(
810 "/api/simulators/{udid}/install-upload",
811 post(upload_install_app).layer(DefaultBodyLimit::max(MAX_APP_UPLOAD_BYTES)),
812 )

Callers 1

app_routerFunction · 0.85

Calls 3

getFunction · 0.85
deleteMethod · 0.65
cloneMethod · 0.65

Tested by

no test coverage detected