(defaults: Partial<SessionDefaults>)
| 95 | } |
| 96 | |
| 97 | function normalizeMutualExclusivity(defaults: Partial<SessionDefaults>): { |
| 98 | normalized: Partial<SessionDefaults>; |
| 99 | notices: string[]; |
| 100 | } { |
| 101 | const normalized: Partial<SessionDefaults> = { ...defaults }; |
| 102 | const notices: string[] = []; |
| 103 | |
| 104 | if (hasValue(normalized, 'projectPath') && hasValue(normalized, 'workspacePath')) { |
| 105 | delete normalized.projectPath; |
| 106 | notices.push('Both projectPath and workspacePath were provided; keeping workspacePath.'); |
| 107 | } |
| 108 | |
| 109 | if (hasValue(normalized, 'simulatorId') && hasValue(normalized, 'simulatorName')) { |
| 110 | notices.push( |
| 111 | 'Both simulatorId and simulatorName were provided; storing both and preferring simulatorId when disambiguating.', |
| 112 | ); |
| 113 | } |
| 114 | |
| 115 | return { normalized, notices }; |
| 116 | } |
| 117 | |
| 118 | function tryFileUrlToPath(value: string): string | null { |
| 119 | if (!value.startsWith('file:')) { |
no test coverage detected