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

Function buildClientDevicePlatformFields

src/client/client-normalizers.ts:160–175  ·  view source on GitHub ↗
(
  platform: AgentDeviceDevice['platform'],
  id: string,
  simulatorSetPath?: string | null,
)

Source from the content-addressed store, hash-verified

158}
159
160function buildClientDevicePlatformFields(
161 platform: AgentDeviceDevice['platform'],
162 id: string,
163 simulatorSetPath?: string | null,
164): Pick<AgentDeviceSessionDevice, 'ios' | 'android'> {
165 return {
166 ios:
167 platform === 'ios'
168 ? {
169 udid: id,
170 ...(simulatorSetPath !== undefined ? { simulatorSetPath } : {}),
171 }
172 : undefined,
173 android: platform === 'android' ? { serial: id } : undefined,
174 };
175}
176
177export function normalizeRuntimeHints(value: unknown): SessionRuntimeHints | undefined {
178 if (!isRecord(value)) return undefined;

Callers 2

normalizeDeviceFunction · 0.85
normalizeSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected