( params: BuildDeviceParams, executor: CommandExecutor, )
| 108 | } |
| 109 | |
| 110 | export async function buildDeviceLogic( |
| 111 | params: BuildDeviceParams, |
| 112 | executor: CommandExecutor, |
| 113 | ): Promise<void> { |
| 114 | const ctx = getHandlerContext(); |
| 115 | const invocationRequest = createBuildDeviceRequest(params); |
| 116 | |
| 117 | ctx.emit(createBuildInvocationFragment('build-result', 'BUILD', invocationRequest)); |
| 118 | const executionContext = createStreamingExecutionContext(ctx); |
| 119 | const executeBuildDevice = createBuildDeviceExecutor(executor); |
| 120 | const result = await executeBuildDevice(params, executionContext); |
| 121 | |
| 122 | setXcodebuildStructuredOutput(ctx, 'build-result', result); |
| 123 | |
| 124 | if (!result.didError) { |
| 125 | ctx.nextStepParams = { |
| 126 | get_device_app_path: { |
| 127 | scheme: params.scheme, |
| 128 | ...(params.derivedDataPath !== undefined |
| 129 | ? { derivedDataPath: params.derivedDataPath } |
| 130 | : {}), |
| 131 | ...(params.platform !== undefined |
| 132 | ? { platform: String(mapDevicePlatform(params.platform)) } |
| 133 | : {}), |
| 134 | }, |
| 135 | }; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | export const schema = getSessionAwareToolSchemaShape({ |
| 140 | sessionAware: publicSchemaObject, |
no test coverage detected