MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / withSimulatorIdOrName

Function withSimulatorIdOrName

src/utils/schema-helpers.ts:31–39  ·  view source on GitHub ↗
(schema: T)

Source from the content-addressed store, hash-verified

29type SimulatorSelector = { simulatorId?: unknown; simulatorName?: unknown };
30
31export function withSimulatorIdOrName<T extends z.ZodType<SimulatorSelector>>(schema: T) {
32 return schema
33 .refine((val) => val.simulatorId !== undefined || val.simulatorName !== undefined, {
34 message: 'Either simulatorId or simulatorName is required.',
35 })
36 .refine((val) => !(val.simulatorId !== undefined && val.simulatorName !== undefined), {
37 message: 'simulatorId and simulatorName are mutually exclusive. Provide only one.',
38 });
39}

Callers 5

build_sim.tsFile · 0.90
build_run_sim.tsFile · 0.90
test_sim.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected