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

Function withProjectOrWorkspace

src/utils/schema-helpers.ts:15–27  ·  view source on GitHub ↗
(baseObject: T)

Source from the content-addressed store, hash-verified

13}
14
15export function withProjectOrWorkspace<T extends z.ZodObject>(baseObject: T) {
16 return baseObject
17 .refine(
18 (val: { projectPath?: unknown; workspacePath?: unknown }) =>
19 val.projectPath !== undefined || val.workspacePath !== undefined,
20 { message: 'Either projectPath or workspacePath is required.' },
21 )
22 .refine(
23 (val: { projectPath?: unknown; workspacePath?: unknown }) =>
24 !(val.projectPath !== undefined && val.workspacePath !== undefined),
25 { message: 'projectPath and workspacePath are mutually exclusive. Provide only one.' },
26 );
27}
28
29type SimulatorSelector = { simulatorId?: unknown; simulatorName?: unknown };
30

Callers 15

clean.tsFile · 0.90
build_macos.tsFile · 0.90
build_run_macos.tsFile · 0.90
test_macos.tsFile · 0.90
test_device.tsFile · 0.90
build_device.tsFile · 0.90
build_sim.tsFile · 0.90
build_run_sim.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected