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

Function studio_provider_bridge_script

packages/server/src/main.rs:3445–3462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3443}
3444
3445fn studio_provider_bridge_script() -> anyhow::Result<PathBuf> {
3446 let mut candidates = Vec::new();
3447 if let Ok(root) = project_root() {
3448 candidates.push(root.join("scripts/studio-provider-bridge.mjs"));
3449 }
3450 if let Ok(current_exe) = env::current_exe() {
3451 if let Some(package_root) = current_exe.parent().and_then(Path::parent) {
3452 candidates.push(package_root.join("scripts/studio-provider-bridge.mjs"));
3453 }
3454 }
3455 if let Ok(current_dir) = env::current_dir() {
3456 candidates.push(current_dir.join("scripts/studio-provider-bridge.mjs"));
3457 }
3458 candidates
3459 .into_iter()
3460 .find(|path| path.is_file())
3461 .ok_or_else(|| anyhow::anyhow!("Unable to find scripts/studio-provider-bridge.mjs."))
3462}
3463
3464fn studio_host_provider_script() -> anyhow::Result<PathBuf> {
3465 let mut candidates = Vec::new();

Callers 1

expose_to_studioFunction · 0.85

Calls 1

project_rootFunction · 0.85

Tested by

no test coverage detected