(nameOrOpt: string | T)
| 14 | import { executeProcess } from '@code-pushup/utils'; |
| 15 | |
| 16 | export function executorContext< |
| 17 | T extends { projectName: string; cwd?: string }, |
| 18 | >(nameOrOpt: string | T): ExecutorContext { |
| 19 | const { projectName, cwd = process.cwd() } = |
| 20 | typeof nameOrOpt === 'string' ? { projectName: nameOrOpt } : nameOrOpt; |
| 21 | return { |
| 22 | cwd, |
| 23 | isVerbose: false, |
| 24 | projectName, |
| 25 | root: '.', |
| 26 | projectsConfigurations: { |
| 27 | projects: { |
| 28 | [projectName]: { |
| 29 | name: projectName, |
| 30 | root: `libs/${projectName}`, |
| 31 | }, |
| 32 | }, |
| 33 | version: 1, |
| 34 | }, |
| 35 | nxJsonConfiguration: {}, |
| 36 | projectGraph: { nodes: {}, dependencies: {} } satisfies ProjectGraph, |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | export async function generateWorkspaceAndProject( |
| 41 | options: |
no outgoing calls
no test coverage detected