@nrwl/workspace 15.8.0-beta.4 → 15.8.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/workspace",
3
- "version": "15.8.0-beta.4",
3
+ "version": "15.8.0-beta.5",
4
4
  "private": false,
5
5
  "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
6
6
  "repository": {
@@ -33,32 +33,32 @@
33
33
  "requirements": {},
34
34
  "migrations": "./migrations.json",
35
35
  "packageGroup": {
36
- "@nrwl/jest": "15.8.0-beta.4",
37
- "@nrwl/linter": "15.8.0-beta.4",
38
- "@nrwl/angular": "15.8.0-beta.4",
39
- "@nrwl/cli": "15.8.0-beta.4",
40
- "@nrwl/cypress": "15.8.0-beta.4",
41
- "@nrwl/detox": "15.8.0-beta.4",
42
- "@nrwl/devkit": "15.8.0-beta.4",
43
- "@nrwl/esbuild": "15.8.0-beta.4",
44
- "@nrwl/eslint-plugin-nx": "15.8.0-beta.4",
45
- "@nrwl/expo": "15.8.0-beta.4",
46
- "@nrwl/express": "15.8.0-beta.4",
47
- "@nrwl/js": "15.8.0-beta.4",
48
- "@nrwl/nest": "15.8.0-beta.4",
49
- "@nrwl/next": "15.8.0-beta.4",
50
- "@nrwl/node": "15.8.0-beta.4",
36
+ "@nrwl/js": "15.8.0-beta.5",
37
+ "@nrwl/jest": "15.8.0-beta.5",
38
+ "@nrwl/linter": "15.8.0-beta.5",
39
+ "@nrwl/angular": "15.8.0-beta.5",
40
+ "@nrwl/cli": "15.8.0-beta.5",
41
+ "@nrwl/cypress": "15.8.0-beta.5",
42
+ "@nrwl/detox": "15.8.0-beta.5",
43
+ "@nrwl/devkit": "15.8.0-beta.5",
44
+ "@nrwl/esbuild": "15.8.0-beta.5",
45
+ "@nrwl/eslint-plugin-nx": "15.8.0-beta.5",
46
+ "@nrwl/expo": "15.8.0-beta.5",
47
+ "@nrwl/express": "15.8.0-beta.5",
48
+ "@nrwl/nest": "15.8.0-beta.5",
49
+ "@nrwl/next": "15.8.0-beta.5",
50
+ "@nrwl/node": "15.8.0-beta.5",
51
51
  "@nrwl/nx-cloud": "latest",
52
- "@nrwl/nx-plugin": "15.8.0-beta.4",
53
- "@nrwl/react-native": "15.8.0-beta.4",
54
- "@nrwl/react": "15.8.0-beta.4",
55
- "@nrwl/rollup": "15.8.0-beta.4",
56
- "@nrwl/storybook": "15.8.0-beta.4",
57
- "@nrwl/tao": "15.8.0-beta.4",
58
- "@nrwl/vite": "15.8.0-beta.4",
59
- "@nrwl/web": "15.8.0-beta.4",
60
- "@nrwl/webpack": "15.8.0-beta.4",
61
- "nx": "15.8.0-beta.4"
52
+ "@nrwl/nx-plugin": "15.8.0-beta.5",
53
+ "@nrwl/react-native": "15.8.0-beta.5",
54
+ "@nrwl/react": "15.8.0-beta.5",
55
+ "@nrwl/rollup": "15.8.0-beta.5",
56
+ "@nrwl/storybook": "15.8.0-beta.5",
57
+ "@nrwl/tao": "15.8.0-beta.5",
58
+ "@nrwl/vite": "15.8.0-beta.5",
59
+ "@nrwl/web": "15.8.0-beta.5",
60
+ "@nrwl/webpack": "15.8.0-beta.5",
61
+ "nx": "15.8.0-beta.5"
62
62
  }
63
63
  },
64
64
  "peerDependencies": {
@@ -70,8 +70,8 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "@nrwl/devkit": "15.8.0-beta.4",
74
- "@nrwl/linter": "15.8.0-beta.4",
73
+ "@nrwl/devkit": "15.8.0-beta.5",
74
+ "@nrwl/linter": "15.8.0-beta.5",
75
75
  "@parcel/watcher": "2.0.4",
76
76
  "chalk": "^4.1.0",
77
77
  "chokidar": "^3.5.1",
@@ -84,7 +84,7 @@
84
84
  "ignore": "^5.0.4",
85
85
  "minimatch": "3.0.5",
86
86
  "npm-run-path": "^4.0.1",
87
- "nx": "15.8.0-beta.4",
87
+ "nx": "15.8.0-beta.5",
88
88
  "open": "^8.4.0",
89
89
  "rxjs": "^6.5.4",
90
90
  "semver": "7.3.4",
@@ -97,5 +97,5 @@
97
97
  "access": "public"
98
98
  },
99
99
  "types": "./index.d.ts",
100
- "gitHead": "8d9603f0e8dc2d1c9931b28894569e833a0a1541"
100
+ "gitHead": "6b0b30ed408640c9fda5291346d818ace7dfd3a2"
101
101
  }
@@ -1,4 +1,5 @@
1
- import { Tree } from '@nrwl/devkit';
1
+ import { Tree, ProjectGraph } from '@nrwl/devkit';
2
+ type CallBack<T> = (currentValue: T, project: string, target: string, configuration?: string) => void;
2
3
  /**
3
4
  * Calls a function for each different options that an executor is configured with
4
5
  */
@@ -10,4 +11,10 @@ executorName: string,
10
11
  /**
11
12
  * Callback that is called for each options configured for a builder
12
13
  */
13
- callback: (currentValue: Options, project: string, target: string, configuration?: string) => void): void;
14
+ callback: CallBack<Options>): void;
15
+ /**
16
+ * Calls a function for each different options that an executor is configured with via the project graph
17
+ * this is helpful when you need to get the expaned configuration options from the nx.json
18
+ **/
19
+ export declare function forEachExecutorOptionsInGraph<Options>(graph: ProjectGraph, executorName: string, callback: CallBack<Options>): void;
20
+ export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.forEachExecutorOptions = void 0;
3
+ exports.forEachExecutorOptionsInGraph = exports.forEachExecutorOptions = void 0;
4
4
  const devkit_1 = require("@nrwl/devkit");
5
5
  /**
6
6
  * Calls a function for each different options that an executor is configured with
@@ -14,7 +14,21 @@ executorName,
14
14
  * Callback that is called for each options configured for a builder
15
15
  */
16
16
  callback) {
17
- for (const [projectName, project] of (0, devkit_1.getProjects)(tree)) {
17
+ forEachProjectConfig((0, devkit_1.getProjects)(tree), executorName, callback);
18
+ }
19
+ exports.forEachExecutorOptions = forEachExecutorOptions;
20
+ /**
21
+ * Calls a function for each different options that an executor is configured with via the project graph
22
+ * this is helpful when you need to get the expaned configuration options from the nx.json
23
+ **/
24
+ function forEachExecutorOptionsInGraph(graph, executorName, callback) {
25
+ const projects = new Map();
26
+ Object.values(graph.nodes).forEach((p) => projects.set(p.name, p.data));
27
+ forEachProjectConfig(projects, executorName, callback);
28
+ }
29
+ exports.forEachExecutorOptionsInGraph = forEachExecutorOptionsInGraph;
30
+ function forEachProjectConfig(projects, executorName, callback) {
31
+ for (const [projectName, project] of projects) {
18
32
  for (const [targetName, target] of Object.entries(project.targets || {})) {
19
33
  if (executorName !== target.executor) {
20
34
  continue;
@@ -31,6 +45,5 @@ callback) {
31
45
  }
32
46
  }
33
47
  }
34
- exports.forEachExecutorOptions = forEachExecutorOptions;
35
48
  // TODO: add a method for updating options
36
49
  //# sourceMappingURL=executor-options-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor-options-utils.js","sourceRoot":"","sources":["../../../../../packages/workspace/src/utilities/executor-options-utils.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AAEjD;;GAEG;AACH,SAAgB,sBAAsB,CACpC,IAAU;AACV;;GAEG;AACH,YAAoB;AACpB;;GAEG;AACH,QAKS;IAET,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE;QACtD,KAAK,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE;YACxE,IAAI,YAAY,KAAK,MAAM,CAAC,QAAQ,EAAE;gBACpC,SAAS;aACV;YAED,IAAI,MAAM,CAAC,OAAO,EAAE;gBAClB,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;aACnD;YAED,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBAC1B,SAAS;aACV;YACD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE;gBACtE,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;SACJ;KACF;AACH,CAAC;AAlCD,wDAkCC;AAED,0CAA0C"}
1
+ {"version":3,"file":"executor-options-utils.js","sourceRoot":"","sources":["../../../../../packages/workspace/src/utilities/executor-options-utils.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AAStB;;GAEG;AACH,SAAgB,sBAAsB,CACpC,IAAU;AACV;;GAEG;AACH,YAAoB;AACpB;;GAEG;AACH,QAA2B;IAE3B,oBAAoB,CAAC,IAAA,oBAAW,EAAC,IAAI,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AAClE,CAAC;AAZD,wDAYC;AAED;;;IAGI;AACJ,SAAgB,6BAA6B,CAC3C,KAAmB,EACnB,YAAoB,EACpB,QAA2B;IAE3B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAgC,CAAC;IACzD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAExE,oBAAoB,CAAU,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AAClE,CAAC;AATD,sEASC;AAED,SAAS,oBAAoB,CAC3B,QAA2C,EAC3C,YAAoB,EACpB,QAA2B;IAE3B,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE;QAC7C,KAAK,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE;YACxE,IAAI,YAAY,KAAK,MAAM,CAAC,QAAQ,EAAE;gBACpC,SAAS;aACV;YAED,IAAI,MAAM,CAAC,OAAO,EAAE;gBAClB,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;aACnD;YAED,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;gBAC1B,SAAS;aACV;YACD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,EAAE;gBACtE,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;SACJ;KACF;AACH,CAAC;AAED,0CAA0C"}