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

Function normalizeSessionDefaultsProfiles

src/utils/project-config.ts:221–240  ·  view source on GitHub ↗
(
  profiles: Record<string, Partial<SessionDefaults>>,
  cwd: string,
)

Source from the content-addressed store, hash-verified

219}
220
221function normalizeSessionDefaultsProfiles(
222 profiles: Record<string, Partial<SessionDefaults>>,
223 cwd: string,
224): { profiles: Record<string, Partial<SessionDefaults>>; notices: string[] } {
225 const normalizedProfiles: Record<string, Partial<SessionDefaults>> = {};
226 const notices: string[] = [];
227
228 for (const [profileName, defaults] of Object.entries(profiles)) {
229 const trimmedName = profileName.trim();
230 if (trimmedName.length === 0) {
231 notices.push('Ignored sessionDefaultsProfiles entry with an empty profile name.');
232 continue;
233 }
234 const normalized = normalizeMutualExclusivity(defaults);
235 notices.push(...normalized.notices.map((notice) => `[profile:${trimmedName}] ${notice}`));
236 normalizedProfiles[trimmedName] = resolveRelativeSessionPaths(normalized.normalized, cwd);
237 }
238
239 return { profiles: normalizedProfiles, notices };
240}
241
242function normalizeDebuggerBackend(config: RuntimeConfigFile): ProjectConfig {
243 if (config.debuggerBackend === 'lldb') {

Callers 1

loadProjectConfigFunction · 0.85

Calls 3

pushMethod · 0.80

Tested by

no test coverage detected