(config?: ProjectConfig)
| 173 | } |
| 174 | |
| 175 | function inferPlatformsFromExisting(config?: ProjectConfig): SetupPlatform[] { |
| 176 | if (!config) return []; |
| 177 | |
| 178 | const stored = config.setupPreferences?.platforms; |
| 179 | if (stored && stored.length > 0) { |
| 180 | return [...stored]; |
| 181 | } |
| 182 | |
| 183 | // No stored preference: only macOS is unambiguously recoverable from enabledWorkflows. |
| 184 | // Simulator-platform identity (iOS vs tvOS vs watchOS vs visionOS) cannot be inferred |
| 185 | // from workflow ids alone, so leave it blank and let the wizard re-prompt. |
| 186 | const workflows = new Set(config.enabledWorkflows ?? []); |
| 187 | return workflows.has('macos') ? ['macOS'] : []; |
| 188 | } |
| 189 | |
| 190 | function derivePlatformSessionDefault(platforms: SetupPlatform[]): string | undefined { |
| 191 | if (platforms.length !== 1) return undefined; |
no outgoing calls
no test coverage detected