1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.checkProjectExists = void 0;
|
4 | const rxjs_1 = require("rxjs");
|
5 | const operators_1 = require("rxjs/operators");
|
6 | const workspace_1 = require("../workspace");
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | function checkProjectExists(schema) {
|
14 | return (tree, _context) => {
|
15 | return (0, rxjs_1.from)((0, workspace_1.getWorkspace)(tree)).pipe((0, operators_1.map)((workspace) => {
|
16 | if (!workspace.projects.has(schema.projectName)) {
|
17 | throw new Error(`Project not found in workspace: [${schema.projectName}]`);
|
18 | }
|
19 | return tree;
|
20 | }));
|
21 | };
|
22 | }
|
23 | exports.checkProjectExists = checkProjectExists;
|
24 |
|
\ | No newline at end of file |