( host: Tree, projectName: string, target: 'server' | 'build', )
| 48 | const DEFAULT_SERVER_DIR = 'server'; |
| 49 | |
| 50 | async function getLegacyOutputPaths( |
| 51 | host: Tree, |
| 52 | projectName: string, |
| 53 | target: 'server' | 'build', |
| 54 | ): Promise<string> { |
| 55 | // Generate new output paths |
| 56 | const workspace = await readWorkspace(host); |
| 57 | const project = workspace.projects.get(projectName); |
| 58 | const architectTarget = project?.targets.get(target); |
| 59 | if (!architectTarget?.options) { |
| 60 | throw new SchematicsException(`Cannot find 'options' for ${projectName} ${target} target.`); |
| 61 | } |
| 62 | |
| 63 | const { outputPath } = architectTarget.options; |
| 64 | if (typeof outputPath !== 'string') { |
| 65 | throw new SchematicsException( |
| 66 | `outputPath for ${projectName} ${target} target is not a string.`, |
| 67 | ); |
| 68 | } |
| 69 | |
| 70 | return outputPath; |
| 71 | } |
| 72 | |
| 73 | async function getApplicationBuilderOutputPaths( |
| 74 | host: Tree, |
no test coverage detected