( host: Tree, options: ComponentOptions, )
| 69 | |
| 70 | /** Wraps the internal find module from options with undefined path handling */ |
| 71 | export async function findModuleFromOptions( |
| 72 | host: Tree, |
| 73 | options: ComponentOptions, |
| 74 | ): Promise<string | undefined> { |
| 75 | const workspace = await readWorkspace(host); |
| 76 | |
| 77 | if (!options.project) { |
| 78 | options.project = Array.from(workspace.projects.keys())[0]; |
| 79 | } |
| 80 | |
| 81 | const project = workspace.projects.get(options.project)!; |
| 82 | |
| 83 | if (options.path === undefined) { |
| 84 | options.path = `/${project.root}/src/app`; |
| 85 | } |
| 86 | |
| 87 | return internalFindModule(host, options); |
| 88 | } |
no test coverage detected