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

Function enrichSentryMetadata

src/daemon.ts:246–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244 setSentryRuntimeContext(baseSentryRuntimeContext);
245
246 const enrichSentryMetadata = async (): Promise<void> => {
247 const commandExecutor = getDefaultCommandExecutor();
248 const xcodeVersion = await getXcodeVersionMetadata(async (command) => {
249 const result = await commandExecutor(command, 'Get Xcode Version');
250 return { success: result.success, output: result.output };
251 });
252 const xcodeAvailable = Boolean(
253 xcodeVersion.version ??
254 xcodeVersion.buildVersion ??
255 xcodeVersion.developerDir ??
256 xcodeVersion.xcodebuildPath,
257 );
258 const axeVersion = await getAxeVersionMetadata(async (command) => {
259 const result = await commandExecutor(command, 'Get AXe Version');
260 return { success: result.success, output: result.output };
261 }, axeBinary?.path);
262
263 setSentryRuntimeContext({
264 ...baseSentryRuntimeContext,
265 xcodeAvailable,
266 axeVersion,
267 xcodeDeveloperDir: xcodeVersion.developerDir,
268 xcodebuildPath: xcodeVersion.xcodebuildPath,
269 xcodeVersion: xcodeVersion.version,
270 xcodeBuildVersion: xcodeVersion.buildVersion,
271 });
272 };
273
274 const catalog = await buildDaemonToolCatalogFromManifest({
275 excludeWorkflows: excludedWorkflows,

Callers 1

mainFunction · 0.85

Calls 4

getXcodeVersionMetadataFunction · 0.90
getAxeVersionMetadataFunction · 0.90
setSentryRuntimeContextFunction · 0.90

Tested by

no test coverage detected