MCPcopy Index your code
hub / github.com/callstack/agent-device / composeDeviceInventoryProvider

Function composeDeviceInventoryProvider

src/provider-device-runtime.ts:210–222  ·  view source on GitHub ↗
(
  runtimes: ProviderDeviceRuntime[],
)

Source from the content-addressed store, hash-verified

208}
209
210function composeDeviceInventoryProvider(
211 runtimes: ProviderDeviceRuntime[],
212): DeviceInventoryProvider | undefined {
213 if (runtimes.length === 0) return undefined;
214 return async (request) => {
215 for (const runtime of runtimes) {
216 if (!runtimeMatchesProvider(runtime, request.leaseProvider)) continue;
217 const devices = await runtime.deviceInventoryProvider(request);
218 if (devices) return devices;
219 }
220 return null;
221 };
222}
223
224async function firstCloudArtifactsResult(
225 runtimes: ProviderDeviceRuntime[],

Calls 1

runtimeMatchesProviderFunction · 0.85

Tested by

no test coverage detected