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

Function formatToolPreflight

src/utils/build-preflight.ts:62–125  ·  view source on GitHub ↗
(params: ToolPreflightParams)

Source from the content-addressed store, hash-verified

60};
61
62export function formatToolPreflight(params: ToolPreflightParams): string {
63 const emoji = OPERATION_EMOJI[params.operation];
64 const lines: string[] = [`${emoji} ${params.operation}`, ''];
65
66 if (params.scheme) {
67 lines.push(` Scheme: ${params.scheme}`);
68 }
69
70 if (params.workspacePath) {
71 lines.push(` Workspace: ${displayPath(params.workspacePath)}`);
72 } else if (params.projectPath) {
73 lines.push(` Project: ${displayPath(params.projectPath)}`);
74 }
75
76 if (params.configuration) {
77 lines.push(` Configuration: ${params.configuration}`);
78 }
79 if (params.platform) {
80 lines.push(` Platform: ${params.platform}`);
81 }
82
83 if (params.simulatorName) {
84 lines.push(` Simulator: ${params.simulatorName}`);
85 } else if (params.simulatorId) {
86 lines.push(` Simulator: ${params.simulatorId}`);
87 }
88
89 if (params.deviceId) {
90 const deviceLabel = params.deviceName
91 ? `${params.deviceName} (${params.deviceId})`
92 : params.deviceId;
93 lines.push(` Device: ${deviceLabel}`);
94 }
95
96 lines.push(
97 ` Derived Data: ${displayPath(
98 resolveEffectiveDerivedDataPath({
99 derivedDataPath: params.derivedDataPath,
100 workspacePath: params.workspacePath,
101 projectPath: params.projectPath,
102 }),
103 )}`,
104 );
105
106 if (params.arch) {
107 lines.push(` Architecture: ${params.arch}`);
108 }
109
110 if (params.xcresultPath) {
111 lines.push(` xcresult: ${displayPath(params.xcresultPath)}`);
112 }
113
114 if (params.file) {
115 lines.push(` File: ${params.file}`);
116 }
117
118 if (params.targetFilter) {
119 lines.push(` Target Filter: ${params.targetFilter}`);

Callers 1

Calls 3

displayPathFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected