( params: BuildSimulatorParams, executor: CommandExecutor, )
| 97 | } |
| 98 | |
| 99 | async function prepareBuildSimExecution( |
| 100 | params: BuildSimulatorParams, |
| 101 | executor: CommandExecutor, |
| 102 | ): Promise<PreparedBuildSimExecution> { |
| 103 | const configuration = params.configuration ?? 'Debug'; |
| 104 | const useLatestOS = params.useLatestOS ?? true; |
| 105 | const inferred = await inferPlatform( |
| 106 | { |
| 107 | projectPath: params.projectPath, |
| 108 | workspacePath: params.workspacePath, |
| 109 | scheme: params.scheme, |
| 110 | simulatorId: params.simulatorId, |
| 111 | simulatorName: params.simulatorName, |
| 112 | }, |
| 113 | executor, |
| 114 | ); |
| 115 | const detectedPlatform = inferred.platform; |
| 116 | const platformName = detectedPlatform.replace(' Simulator', ''); |
| 117 | |
| 118 | return { |
| 119 | configuration, |
| 120 | detectedPlatform, |
| 121 | platformName, |
| 122 | sharedBuildParams: { ...params, configuration }, |
| 123 | platformOptions: { |
| 124 | platform: detectedPlatform, |
| 125 | simulatorName: params.simulatorName, |
| 126 | simulatorId: params.simulatorId, |
| 127 | useLatestOS: params.simulatorId ? false : useLatestOS, |
| 128 | logPrefix: `${platformName} Simulator Build`, |
| 129 | }, |
| 130 | invocationRequest: { |
| 131 | scheme: params.scheme, |
| 132 | workspacePath: params.workspacePath, |
| 133 | projectPath: params.projectPath, |
| 134 | derivedDataPath: resolveEffectiveDerivedDataPath(params), |
| 135 | configuration, |
| 136 | platform: detectedPlatform, |
| 137 | simulatorName: params.simulatorName, |
| 138 | simulatorId: params.simulatorId, |
| 139 | }, |
| 140 | warningMessage: |
| 141 | params.simulatorId && params.useLatestOS !== undefined |
| 142 | ? 'useLatestOS parameter is ignored when using simulatorId (UUID implies exact device/OS)' |
| 143 | : undefined, |
| 144 | }; |
| 145 | } |
| 146 | |
| 147 | const publicSchemaObject = baseSchemaObject.omit({ |
| 148 | projectPath: true, |
no test coverage detected