MCPcopy
hub / github.com/angular/angularfire / getProject

Function getProject

src/schematics/utils.ts:55–79  ·  view source on GitHub ↗
(options: DeployOptions, host: Tree)

Source from the content-addressed store, hash-verified

53}
54
55export 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
81export function getFirebaseProjectNameFromHost(
82 host: Tree,

Callers 2

setupProjectFunction · 0.90
ngAddSetupProjectFunction · 0.90

Calls 1

getWorkspaceFunction · 0.85

Tested by

no test coverage detected