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

Function createNoticeFragment

src/utils/xcodebuild-output.ts:30–58  ·  view source on GitHub ↗
(
  _operation: XcodebuildOperation,
  message: string,
  level: NoticeLevel = 'info',
  options: {
    code?: string;
    data?: Record<string, string | number | boolean>;
  } = {},
)

Source from the content-addressed store, hash-verified

28}
29
30export function createNoticeFragment(
31 _operation: XcodebuildOperation,
32 message: string,
33 level: NoticeLevel = 'info',
34 options: {
35 code?: string;
36 data?: Record<string, string | number | boolean>;
37 } = {},
38): RuntimeStatusFragment {
39 if (options.code === 'build-run-step' && options.data) {
40 const data = options.data as { step: string; status?: string };
41 return {
42 kind: 'infrastructure',
43 fragment: 'status',
44 level: data.status === 'succeeded' ? 'success' : 'info',
45 message: formatBuildRunStepLabel(data.step),
46 };
47 }
48
49 const statusLevel: RuntimeStatusFragment['level'] =
50 level === 'success' || level === 'warning' ? level : 'info';
51
52 return {
53 kind: 'infrastructure',
54 fragment: 'status',
55 level: statusLevel,
56 message,
57 };
58}
59
60export function finalizeInlineXcodebuild(options: FinalizeInlineXcodebuildOptions): PipelineResult {
61 return options.started.pipeline.finalize(options.succeeded, options.durationMs);

Callers 1

addBuildMessageFunction · 0.90

Calls 1

formatBuildRunStepLabelFunction · 0.85

Tested by

no test coverage detected