1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.forEachExecutorOptions = void 0;
|
4 | const devkit_1 = require("@nrwl/devkit");
|
5 |
|
6 |
|
7 |
|
8 | function forEachExecutorOptions(tree,
|
9 | /**
|
10 | * Name of the executor to update options for
|
11 | */
|
12 | executorName,
|
13 |
|
14 |
|
15 |
|
16 | callback) {
|
17 | for (const [projectName, project] of (0, devkit_1.getProjects)(tree)) {
|
18 | for (const [targetName, target] of Object.entries(project.targets || {})) {
|
19 | if (executorName !== target.executor) {
|
20 | continue;
|
21 | }
|
22 | if (target.options) {
|
23 | callback(target.options, projectName, targetName);
|
24 | }
|
25 | if (!target.configurations) {
|
26 | continue;
|
27 | }
|
28 | Object.entries(target.configurations).forEach(([configName, options]) => {
|
29 | callback(options, projectName, targetName, configName);
|
30 | });
|
31 | }
|
32 | }
|
33 | }
|
34 | exports.forEachExecutorOptions = forEachExecutorOptions;
|
35 |
|
36 |
|
\ | No newline at end of file |