MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / normalizeMutualExclusivity

Function normalizeMutualExclusivity

src/utils/project-config.ts:97–116  ·  view source on GitHub ↗
(defaults: Partial<SessionDefaults>)

Source from the content-addressed store, hash-verified

95}
96
97function normalizeMutualExclusivity(defaults: Partial<SessionDefaults>): {
98 normalized: Partial<SessionDefaults>;
99 notices: string[];
100} {
101 const normalized: Partial<SessionDefaults> = { ...defaults };
102 const notices: string[] = [];
103
104 if (hasValue(normalized, 'projectPath') && hasValue(normalized, 'workspacePath')) {
105 delete normalized.projectPath;
106 notices.push('Both projectPath and workspacePath were provided; keeping workspacePath.');
107 }
108
109 if (hasValue(normalized, 'simulatorId') && hasValue(normalized, 'simulatorName')) {
110 notices.push(
111 'Both simulatorId and simulatorName were provided; storing both and preferring simulatorId when disambiguating.',
112 );
113 }
114
115 return { normalized, notices };
116}
117
118function tryFileUrlToPath(value: string): string | null {
119 if (!value.startsWith('file:')) {

Callers 2

loadProjectConfigFunction · 0.85

Calls 2

hasValueFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected