(baseObject: T)
| 13 | } |
| 14 | |
| 15 | export function withProjectOrWorkspace<T extends z.ZodObject>(baseObject: T) { |
| 16 | return baseObject |
| 17 | .refine( |
| 18 | (val: { projectPath?: unknown; workspacePath?: unknown }) => |
| 19 | val.projectPath !== undefined || val.workspacePath !== undefined, |
| 20 | { message: 'Either projectPath or workspacePath is required.' }, |
| 21 | ) |
| 22 | .refine( |
| 23 | (val: { projectPath?: unknown; workspacePath?: unknown }) => |
| 24 | !(val.projectPath !== undefined && val.workspacePath !== undefined), |
| 25 | { message: 'projectPath and workspacePath are mutually exclusive. Provide only one.' }, |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | type SimulatorSelector = { simulatorId?: unknown; simulatorName?: unknown }; |
| 30 |
no outgoing calls
no test coverage detected