(options: DeployOptions, host: Tree)
| 53 | } |
| 54 | |
| 55 | export const getProject = (options: DeployOptions, host: Tree) => { |
| 56 | const { workspace } = getWorkspace(host); |
| 57 | const projectName = options.project || workspace.defaultProject; |
| 58 | |
| 59 | if (!projectName) { |
| 60 | throw new SchematicsException( |
| 61 | "No Angular project selected and no default project in the workspace" |
| 62 | ); |
| 63 | } |
| 64 | |
| 65 | const project = workspace.projects[projectName]; |
| 66 | if (!project) { |
| 67 | throw new SchematicsException( |
| 68 | "The specified Angular project is not defined in this workspace" |
| 69 | ); |
| 70 | } |
| 71 | |
| 72 | if (project.projectType !== "application") { |
| 73 | throw new SchematicsException( |
| 74 | `Deploy requires an Angular project type of "application" in angular.json` |
| 75 | ); |
| 76 | } |
| 77 | |
| 78 | return { project, projectName }; |
| 79 | }; |
| 80 | |
| 81 | export function getFirebaseProjectNameFromHost( |
| 82 | host: Tree, |
no test coverage detected