nx 18.3.0-beta.0 → 18.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/bin/post-install.js +7 -5
  2. package/package.json +12 -12
  3. package/src/adapter/angular-json.d.ts +2 -1
  4. package/src/adapter/angular-json.js +1 -0
  5. package/src/adapter/ngcli-adapter.d.ts +2 -2
  6. package/src/adapter/ngcli-adapter.js +13 -13
  7. package/src/command-line/generate/generator-utils.js +2 -2
  8. package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -1
  9. package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -1
  10. package/src/command-line/init/implementation/react/index.js +1 -1
  11. package/src/command-line/init/implementation/utils.d.ts +1 -1
  12. package/src/command-line/init/implementation/utils.js +2 -7
  13. package/src/command-line/init/init-v2.js +29 -37
  14. package/src/command-line/release/command-object.js +1 -1
  15. package/src/command-line/run/executor-utils.js +2 -2
  16. package/src/config/nx-json.d.ts +2 -1
  17. package/src/config/schema-utils.js +2 -2
  18. package/src/core/graph/3rdpartylicenses.txt +23 -26
  19. package/src/core/graph/main.js +1 -1
  20. package/src/core/graph/runtime.js +1 -1
  21. package/src/core/graph/styles.js +1 -1
  22. package/src/daemon/client/client.js +1 -2
  23. package/src/daemon/server/plugins.d.ts +3 -0
  24. package/src/daemon/server/plugins.js +22 -0
  25. package/src/daemon/server/project-graph-incremental-recomputation.js +11 -10
  26. package/src/daemon/server/shutdown-utils.js +2 -0
  27. package/src/devkit-exports.d.ts +3 -2
  28. package/src/devkit-internals.d.ts +3 -0
  29. package/src/devkit-internals.js +7 -1
  30. package/src/executors/run-commands/run-commands.impl.d.ts +4 -1
  31. package/src/executors/run-commands/run-commands.impl.js +51 -4
  32. package/src/executors/utils/convert-nx-executor.js +4 -1
  33. package/src/generators/utils/project-configuration.js +2 -2
  34. package/src/migrations/update-15-1-0/set-project-names.js +4 -2
  35. package/src/native/assert-supported-platform.js +1 -1
  36. package/src/plugins/js/index.d.ts +1 -1
  37. package/src/plugins/js/lock-file/lock-file.d.ts +1 -1
  38. package/src/plugins/js/lock-file/npm-parser.d.ts +1 -1
  39. package/src/plugins/js/lock-file/pnpm-parser.d.ts +1 -1
  40. package/src/plugins/js/lock-file/yarn-parser.d.ts +1 -1
  41. package/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +1 -1
  42. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +1 -1
  43. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +1 -1
  44. package/src/plugins/package-json-workspaces/create-nodes.d.ts +2 -2
  45. package/src/plugins/package-json-workspaces/create-nodes.js +24 -31
  46. package/src/plugins/package-json-workspaces/index.d.ts +1 -0
  47. package/src/plugins/package-json-workspaces/index.js +2 -0
  48. package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.d.ts +2 -1
  49. package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.js +1 -0
  50. package/src/plugins/project-json/build-nodes/project-json.d.ts +2 -1
  51. package/src/plugins/project-json/build-nodes/project-json.js +1 -0
  52. package/src/plugins/target-defaults/symbols.d.ts +17 -0
  53. package/src/plugins/target-defaults/symbols.js +20 -0
  54. package/src/plugins/target-defaults/target-defaults-plugin.d.ts +2 -18
  55. package/src/plugins/target-defaults/target-defaults-plugin.js +5 -20
  56. package/src/project-graph/affected/locators/project-glob-changes.js +3 -3
  57. package/src/project-graph/build-project-graph.d.ts +2 -1
  58. package/src/project-graph/build-project-graph.js +11 -13
  59. package/src/project-graph/error-types.d.ts +45 -0
  60. package/src/project-graph/error-types.js +100 -0
  61. package/src/project-graph/file-utils.js +3 -3
  62. package/src/project-graph/plugins/index.d.ts +2 -0
  63. package/src/project-graph/plugins/index.js +8 -0
  64. package/src/project-graph/plugins/internal-api.d.ts +28 -0
  65. package/src/project-graph/plugins/internal-api.js +85 -0
  66. package/src/project-graph/plugins/isolation/index.d.ts +3 -0
  67. package/src/project-graph/plugins/isolation/index.js +16 -0
  68. package/src/project-graph/plugins/isolation/messaging.d.ts +94 -0
  69. package/src/project-graph/plugins/isolation/messaging.js +23 -0
  70. package/src/project-graph/plugins/isolation/plugin-pool.d.ts +3 -0
  71. package/src/project-graph/plugins/isolation/plugin-pool.js +189 -0
  72. package/src/project-graph/plugins/isolation/plugin-worker.d.ts +1 -0
  73. package/src/project-graph/plugins/isolation/plugin-worker.js +81 -0
  74. package/src/project-graph/plugins/loader.d.ts +24 -0
  75. package/src/project-graph/plugins/loader.js +206 -0
  76. package/src/{utils/nx-plugin.d.ts → project-graph/plugins/public-api.d.ts} +8 -44
  77. package/src/project-graph/plugins/public-api.js +4 -0
  78. package/src/project-graph/plugins/utils.d.ts +7 -0
  79. package/src/project-graph/plugins/utils.js +80 -0
  80. package/src/project-graph/project-graph-builder.d.ts +1 -1
  81. package/src/project-graph/project-graph.d.ts +4 -3
  82. package/src/project-graph/project-graph.js +9 -7
  83. package/src/project-graph/utils/normalize-project-nodes.d.ts +1 -1
  84. package/src/project-graph/utils/project-configuration-utils.d.ts +3 -26
  85. package/src/project-graph/utils/project-configuration-utils.js +54 -109
  86. package/src/project-graph/utils/retrieve-workspace-files.d.ts +11 -10
  87. package/src/project-graph/utils/retrieve-workspace-files.js +19 -26
  88. package/src/tasks-runner/cache.js +1 -1
  89. package/src/utils/is-ci.js +1 -1
  90. package/src/utils/logger.d.ts +1 -0
  91. package/src/utils/logger.js +5 -0
  92. package/src/utils/nx-plugin.deprecated.d.ts +2 -2
  93. package/src/utils/nx-plugin.deprecated.js +5 -7
  94. package/src/utils/plugins/plugin-capabilities.d.ts +1 -1
  95. package/src/utils/plugins/plugin-capabilities.js +18 -12
  96. package/src/utils/nx-plugin.js +0 -309
@@ -1 +1 @@
1
- (()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={1:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[l,a,u]=t,d=0;if(l.some((r=>0!==e[r]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(u)var f=u(o)}for(r&&r(t);d<l.length;d++)i=l[d],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
1
+ (()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={666:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[l,a,u]=t,d=0;if(l.some((r=>0!==e[r]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(u)var f=u(o)}for(r&&r(t);d<l.length;d++)i=l[d],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2],{22232:(s,e,k)=>{k.r(e)}},s=>{var e;e=22232,s(s.s=e)}]);
1
+ "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{22232:()=>{}},s=>{var e;e=22232,s(s.s=e)}]);
@@ -21,7 +21,6 @@ const cache_1 = require("../cache");
21
21
  const daemon_project_graph_error_1 = require("../daemon-project-graph-error");
22
22
  const project_graph_1 = require("../../project-graph/project-graph");
23
23
  const DAEMON_ENV_SETTINGS = {
24
- ...process.env,
25
24
  NX_PROJECT_GLOB_CACHE: 'false',
26
25
  NX_CACHE_PROJECTS_CONFIG: 'false',
27
26
  };
@@ -293,7 +292,7 @@ class DaemonClient {
293
292
  detached: true,
294
293
  windowsHide: true,
295
294
  shell: false,
296
- env: DAEMON_ENV_SETTINGS,
295
+ env: { ...process.env, ...DAEMON_ENV_SETTINGS },
297
296
  });
298
297
  backgroundProcess.unref();
299
298
  /**
@@ -0,0 +1,3 @@
1
+ import { LoadedNxPlugin } from '../../project-graph/plugins/internal-api';
2
+ export declare function getPlugins(): Promise<LoadedNxPlugin[]>;
3
+ export declare function cleanupPlugins(): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cleanupPlugins = exports.getPlugins = void 0;
4
+ const nx_json_1 = require("../../config/nx-json");
5
+ const internal_api_1 = require("../../project-graph/plugins/internal-api");
6
+ const workspace_root_1 = require("../../utils/workspace-root");
7
+ let loadedPlugins;
8
+ let cleanup;
9
+ async function getPlugins() {
10
+ if (loadedPlugins) {
11
+ return loadedPlugins;
12
+ }
13
+ const pluginsConfiguration = (0, nx_json_1.readNxJson)().plugins ?? [];
14
+ const [result, cleanupFn] = await (0, internal_api_1.loadNxPlugins)(pluginsConfiguration, workspace_root_1.workspaceRoot);
15
+ cleanup = cleanupFn;
16
+ return result;
17
+ }
18
+ exports.getPlugins = getPlugins;
19
+ function cleanupPlugins() {
20
+ cleanup();
21
+ }
22
+ exports.cleanupPlugins = cleanupPlugins;
@@ -13,8 +13,9 @@ const workspace_context_1 = require("../../utils/workspace-context");
13
13
  const workspace_root_1 = require("../../utils/workspace-root");
14
14
  const file_watcher_sockets_1 = require("./file-watching/file-watcher-sockets");
15
15
  const logger_1 = require("./logger");
16
- const project_configuration_utils_1 = require("../../project-graph/utils/project-configuration-utils");
17
16
  const daemon_project_graph_error_1 = require("../daemon-project-graph-error");
17
+ const plugins_1 = require("./plugins");
18
+ const error_types_1 = require("../../project-graph/error-types");
18
19
  let cachedSerializedProjectGraphPromise;
19
20
  const collectedUpdatedFiles = new Set();
20
21
  const collectedDeletedFiles = new Set();
@@ -32,15 +33,16 @@ async function getCachedSerializedProjectGraphPromise() {
32
33
  // reset the wait time
33
34
  waitPeriod = 100;
34
35
  await resetInternalStateIfNxDepsMissing();
36
+ const plugins = await (0, plugins_1.getPlugins)();
35
37
  if (collectedUpdatedFiles.size == 0 && collectedDeletedFiles.size == 0) {
36
38
  if (!cachedSerializedProjectGraphPromise) {
37
39
  cachedSerializedProjectGraphPromise =
38
- processFilesAndCreateAndSerializeProjectGraph();
40
+ processFilesAndCreateAndSerializeProjectGraph(plugins);
39
41
  }
40
42
  }
41
43
  else {
42
44
  cachedSerializedProjectGraphPromise =
43
- processFilesAndCreateAndSerializeProjectGraph();
45
+ processFilesAndCreateAndSerializeProjectGraph(plugins);
44
46
  }
45
47
  return await cachedSerializedProjectGraphPromise;
46
48
  }
@@ -80,7 +82,7 @@ function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) {
80
82
  waitPeriod = waitPeriod * 2;
81
83
  }
82
84
  cachedSerializedProjectGraphPromise =
83
- processFilesAndCreateAndSerializeProjectGraph();
85
+ processFilesAndCreateAndSerializeProjectGraph(await (0, plugins_1.getPlugins)());
84
86
  await cachedSerializedProjectGraphPromise;
85
87
  if (createdFiles.length > 0) {
86
88
  (0, file_watcher_sockets_1.notifyFileWatcherSockets)(createdFiles, null, null);
@@ -128,7 +130,7 @@ async function processCollectedUpdatedAndDeletedFiles({ projects, externalNodes,
128
130
  throw e;
129
131
  }
130
132
  }
131
- async function processFilesAndCreateAndSerializeProjectGraph() {
133
+ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
132
134
  try {
133
135
  perf_hooks_1.performance.mark('hash-watched-changes-start');
134
136
  const updatedFiles = [...collectedUpdatedFiles.values()];
@@ -140,15 +142,14 @@ async function processFilesAndCreateAndSerializeProjectGraph() {
140
142
  logger_1.serverLogger.requestLog([...updatedFiles.values()]);
141
143
  logger_1.serverLogger.requestLog([...deletedFiles]);
142
144
  const nxJson = (0, nx_json_1.readNxJson)(workspace_root_1.workspaceRoot);
143
- // Set this globally to allow plugins to know if they are being called from the project graph creation
144
145
  global.NX_GRAPH_CREATION = true;
145
146
  let graphNodes;
146
147
  let projectConfigurationsError;
147
148
  try {
148
- graphNodes = await (0, retrieve_workspace_files_1.retrieveProjectConfigurations)(workspace_root_1.workspaceRoot, nxJson);
149
+ graphNodes = await (0, retrieve_workspace_files_1.retrieveProjectConfigurations)(plugins, workspace_root_1.workspaceRoot, nxJson);
149
150
  }
150
151
  catch (e) {
151
- if (e instanceof project_configuration_utils_1.ProjectConfigurationsError) {
152
+ if (e instanceof error_types_1.ProjectConfigurationsError) {
152
153
  graphNodes = e.partialProjectConfigurationsResult;
153
154
  projectConfigurationsError = e;
154
155
  }
@@ -162,7 +163,7 @@ async function processFilesAndCreateAndSerializeProjectGraph() {
162
163
  const errors = [...(projectConfigurationsError?.errors ?? [])];
163
164
  if (g.error) {
164
165
  if (g.error instanceof build_project_graph_1.CreateDependenciesError) {
165
- errors.concat(g.error.errors);
166
+ errors.push(...g.error.errors);
166
167
  }
167
168
  else {
168
169
  return {
@@ -226,7 +227,7 @@ async function createAndSerializeProjectGraph({ projects, sourceMaps, }) {
226
227
  const fileMap = copyFileMap(exports.fileMapWithFiles.fileMap);
227
228
  const allWorkspaceFiles = copyFileData(exports.fileMapWithFiles.allWorkspaceFiles);
228
229
  const rustReferences = exports.fileMapWithFiles.rustReferences;
229
- const { projectGraph, projectFileMapCache } = await (0, build_project_graph_1.buildProjectGraphUsingProjectFileMap)(projects, knownExternalNodes, fileMap, allWorkspaceFiles, rustReferences, exports.currentProjectFileMapCache || (0, nx_deps_cache_1.readFileMapCache)());
230
+ const { projectGraph, projectFileMapCache } = await (0, build_project_graph_1.buildProjectGraphUsingProjectFileMap)(projects, knownExternalNodes, fileMap, allWorkspaceFiles, rustReferences, exports.currentProjectFileMapCache || (0, nx_deps_cache_1.readFileMapCache)(), await (0, plugins_1.getPlugins)());
230
231
  exports.currentProjectFileMapCache = projectFileMapCache;
231
232
  exports.currentProjectGraph = projectGraph;
232
233
  perf_hooks_1.performance.mark('create-project-graph-end');
@@ -5,6 +5,7 @@ const workspace_root_1 = require("../../utils/workspace-root");
5
5
  const logger_1 = require("./logger");
6
6
  const socket_utils_1 = require("../socket-utils");
7
7
  const cache_1 = require("../cache");
8
+ const plugins_1 = require("./plugins");
8
9
  exports.SERVER_INACTIVITY_TIMEOUT_MS = 10800000; // 10800000 ms = 3 hours
9
10
  let watcherInstance;
10
11
  function storeWatcherInstance(instance) {
@@ -28,6 +29,7 @@ async function handleServerProcessTermination({ server, reason, }) {
28
29
  try {
29
30
  server.close();
30
31
  (0, cache_1.deleteDaemonJsonProcessCache)();
32
+ (0, plugins_1.cleanupPlugins)();
31
33
  if (watcherInstance) {
32
34
  await watcherInstance.stop();
33
35
  logger_1.serverLogger.watcherLog(`Stopping the watcher for ${workspace_root_1.workspaceRoot} (sources)`);
@@ -19,7 +19,8 @@ export type { Generator, GeneratorCallback, Executor, ExecutorContext, TaskGraph
19
19
  */
20
20
  export { Workspaces } from './config/workspaces';
21
21
  export { workspaceLayout } from './config/configuration';
22
- export type { NxPlugin, NxPluginV1, NxPluginV2, ProjectTargetConfigurator, CreateNodes, CreateNodesFunction, CreateNodesResult, CreateNodesContext, CreateDependencies, CreateDependenciesContext, } from './utils/nx-plugin';
22
+ export type { NxPlugin, NxPluginV2, CreateNodes, CreateNodesFunction, CreateNodesResult, CreateNodesContext, CreateDependencies, CreateDependenciesContext, } from './project-graph/plugins';
23
+ export type { NxPluginV1, ProjectTargetConfigurator, } from './utils/nx-plugin.deprecated';
23
24
  /**
24
25
  * @category Workspace
25
26
  */
@@ -27,7 +28,7 @@ export type { Task, TaskGraph } from './config/task-graph';
27
28
  /**
28
29
  * @category Workspace
29
30
  */
30
- export type { ImplicitDependencyEntry, ImplicitJsonSubsetDependency, NxJsonConfiguration, PluginConfiguration, TargetDefaults, NxAffectedConfig, } from './config/nx-json';
31
+ export type { ImplicitDependencyEntry, ImplicitJsonSubsetDependency, NxJsonConfiguration, PluginConfiguration, ExpandedPluginConfiguration, TargetDefaults, NxAffectedConfig, } from './config/nx-json';
31
32
  /**
32
33
  * @category Logger
33
34
  */
@@ -17,4 +17,7 @@ export { splitByColons } from './utils/split-target';
17
17
  export { hashObject } from './hasher/file-hasher';
18
18
  export { hashWithWorkspaceContext } from './utils/workspace-context';
19
19
  export { createProjectRootMappingsFromProjectConfigurations, findProjectForPath, } from './project-graph/utils/find-project-for-path';
20
+ export { retrieveProjectConfigurations } from './project-graph/utils/retrieve-workspace-files';
21
+ export { LoadedNxPlugin } from './project-graph/plugins/internal-api';
22
+ export * from './project-graph/error-types';
20
23
  export { registerTsProject } from './plugins/js/utils/register';
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerTsProject = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
3
+ exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  /**
5
6
  * Note to developers: STOP! These exports are available via requireNx in @nx/devkit.
6
7
  *
@@ -35,5 +36,10 @@ Object.defineProperty(exports, "hashWithWorkspaceContext", { enumerable: true, g
35
36
  var find_project_for_path_1 = require("./project-graph/utils/find-project-for-path");
36
37
  Object.defineProperty(exports, "createProjectRootMappingsFromProjectConfigurations", { enumerable: true, get: function () { return find_project_for_path_1.createProjectRootMappingsFromProjectConfigurations; } });
37
38
  Object.defineProperty(exports, "findProjectForPath", { enumerable: true, get: function () { return find_project_for_path_1.findProjectForPath; } });
39
+ var retrieve_workspace_files_2 = require("./project-graph/utils/retrieve-workspace-files");
40
+ Object.defineProperty(exports, "retrieveProjectConfigurations", { enumerable: true, get: function () { return retrieve_workspace_files_2.retrieveProjectConfigurations; } });
41
+ var internal_api_1 = require("./project-graph/plugins/internal-api");
42
+ Object.defineProperty(exports, "LoadedNxPlugin", { enumerable: true, get: function () { return internal_api_1.LoadedNxPlugin; } });
43
+ tslib_1.__exportStar(require("./project-graph/error-types"), exports);
38
44
  var register_1 = require("./plugins/js/utils/register");
39
45
  Object.defineProperty(exports, "registerTsProject", { enumerable: true, get: function () { return register_1.registerTsProject; } });
@@ -39,10 +39,13 @@ export interface NormalizedRunCommandsOptions extends RunCommandsOptions {
39
39
  parsedArgs: {
40
40
  [k: string]: any;
41
41
  };
42
+ unparsedCommandArgs?: {
43
+ [k: string]: string;
44
+ };
42
45
  args?: string;
43
46
  }
44
47
  export default function (options: RunCommandsOptions, context: ExecutorContext): Promise<{
45
48
  success: boolean;
46
49
  terminalOutput: string;
47
50
  }>;
48
- export declare function interpolateArgsIntoCommand(command: string, opts: Pick<NormalizedRunCommandsOptions, 'args' | 'parsedArgs' | '__unparsed__' | 'unknownOptions'>, forwardAllArgs: boolean): string;
51
+ export declare function interpolateArgsIntoCommand(command: string, opts: Pick<NormalizedRunCommandsOptions, 'args' | 'parsedArgs' | '__unparsed__' | 'unknownOptions' | 'unparsedCommandArgs'>, forwardAllArgs: boolean): string;
@@ -129,6 +129,7 @@ function normalizeOptions(options) {
129
129
  .filter((p) => propKeys.indexOf(p) === -1 && unparsedCommandArgs[p] === undefined)
130
130
  .reduce((m, c) => ((m[c] = options[c]), m), {});
131
131
  options.parsedArgs = parseArgs(unparsedCommandArgs, options.unknownOptions, options.args);
132
+ options.unparsedCommandArgs = unparsedCommandArgs;
132
133
  options.commands.forEach((c) => {
133
134
  c.command = interpolateArgsIntoCommand(c.command, options, c.forwardAllArgs ?? true);
134
135
  });
@@ -162,12 +163,15 @@ async function createProcess(pseudoTerminal, commandConfig, readyWhen, color, cw
162
163
  !commandConfig.prefix &&
163
164
  !isParallel &&
164
165
  usePty) {
166
+ let terminalOutput = chalk.dim('> ') + commandConfig.command + '\r\n\r\n';
167
+ if (streamOutput) {
168
+ process.stdout.write(terminalOutput);
169
+ }
165
170
  const cp = pseudoTerminal.runCommand(commandConfig.command, {
166
171
  cwd,
167
172
  jsEnv: env,
168
173
  quiet: !streamOutput,
169
174
  });
170
- let terminalOutput = '';
171
175
  return new Promise((res) => {
172
176
  cp.onOutput((output) => {
173
177
  terminalOutput += output;
@@ -188,7 +192,10 @@ async function createProcess(pseudoTerminal, commandConfig, readyWhen, color, cw
188
192
  return nodeProcess(commandConfig, cwd, env, readyWhen, streamOutput);
189
193
  }
190
194
  function nodeProcess(commandConfig, cwd, env, readyWhen, streamOutput = true) {
191
- let terminalOutput = '';
195
+ let terminalOutput = chalk.dim('> ') + commandConfig.command + '\r\n\r\n';
196
+ if (streamOutput) {
197
+ process.stdout.write(terminalOutput);
198
+ }
192
199
  return new Promise((res) => {
193
200
  const childProcess = (0, child_process_1.exec)(commandConfig.command, {
194
201
  maxBuffer: exports.LARGE_BUFFER,
@@ -290,14 +297,17 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
290
297
  Object.keys(opts.unknownOptions)
291
298
  .filter((k) => typeof opts.unknownOptions[k] !== 'object' &&
292
299
  opts.parsedArgs[k] === opts.unknownOptions[k])
293
- .map((k) => `--${k} ${opts.unknownOptions[k]}`)
300
+ .map((k) => `--${k}=${opts.unknownOptions[k]}`)
294
301
  .join(' ');
295
302
  }
296
303
  if (opts.args) {
297
304
  args += ` ${opts.args}`;
298
305
  }
299
306
  if (opts.__unparsed__?.length > 0) {
300
- args += ` ${opts.__unparsed__.join(' ')}`;
307
+ const filterdParsedOptions = filterPropKeysFromUnParsedOptions(opts.__unparsed__, opts.unparsedCommandArgs);
308
+ if (filterdParsedOptions.length > 0) {
309
+ args += ` ${filterdParsedOptions.join(' ')}`;
310
+ }
301
311
  }
302
312
  return `${command}${args}`;
303
313
  }
@@ -314,3 +324,40 @@ function parseArgs(unparsedCommandArgs, unknownOptions, args) {
314
324
  configuration: { 'camel-case-expansion': false },
315
325
  });
316
326
  }
327
+ /**
328
+ * This function filters out the prop keys from the unparsed options
329
+ * @param __unparsed__ e.g. ['--prop1', 'value1', '--prop2=value2', '--args=test']
330
+ * @param unparsedCommandArgs e.g. { prop1: 'value1', prop2: 'value2', args: 'test'}
331
+ * @returns filtered options that are not part of the propKeys array e.g. ['--prop1', 'value1', '--prop2=value2']
332
+ */
333
+ function filterPropKeysFromUnParsedOptions(__unparsed__, unparsedCommandArgs = {}) {
334
+ const parsedOptions = [];
335
+ for (let index = 0; index < __unparsed__.length; index++) {
336
+ const element = __unparsed__[index];
337
+ if (element.startsWith('--')) {
338
+ const key = element.replace('--', '');
339
+ if (element.includes('=')) {
340
+ if (!propKeys.includes(key.split('=')[0].split('.')[0])) {
341
+ // check if the key is part of the propKeys array
342
+ parsedOptions.push(element);
343
+ }
344
+ }
345
+ else {
346
+ // check if the next element is a value for the key
347
+ if (propKeys.includes(key)) {
348
+ if (index + 1 < __unparsed__.length &&
349
+ __unparsed__[index + 1] === unparsedCommandArgs[key]) {
350
+ index++; // skip the next element
351
+ }
352
+ }
353
+ else {
354
+ parsedOptions.push(element);
355
+ }
356
+ }
357
+ }
358
+ else {
359
+ parsedOptions.push(element);
360
+ }
361
+ }
362
+ return parsedOptions;
363
+ }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.convertNxExecutor = void 0;
7
7
  const nx_json_1 = require("../../config/nx-json");
8
8
  const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-workspace-files");
9
+ const internal_api_1 = require("../../project-graph/plugins/internal-api");
9
10
  /**
10
11
  * Convert an Nx Executor into an Angular Devkit Builder
11
12
  *
@@ -15,10 +16,12 @@ function convertNxExecutor(executor) {
15
16
  const builderFunction = (options, builderContext) => {
16
17
  const promise = async () => {
17
18
  const nxJsonConfiguration = (0, nx_json_1.readNxJson)(builderContext.workspaceRoot);
19
+ const [plugins, cleanup] = await (0, internal_api_1.loadNxPlugins)(nxJsonConfiguration.plugins, builderContext.workspaceRoot);
18
20
  const projectsConfigurations = {
19
21
  version: 2,
20
- projects: (await (0, retrieve_workspace_files_1.retrieveProjectConfigurations)(builderContext.workspaceRoot, nxJsonConfiguration)).projects,
22
+ projects: (await (0, retrieve_workspace_files_1.retrieveProjectConfigurations)(plugins, builderContext.workspaceRoot, nxJsonConfiguration)).projects,
21
23
  };
24
+ cleanup();
22
25
  const context = {
23
26
  root: builderContext.workspaceRoot,
24
27
  projectName: builderContext.target.project,
@@ -136,8 +136,8 @@ function readAndCombineAllProjectConfigurations(tree) {
136
136
  ...(0, package_json_workspaces_1.getGlobPatternsFromPackageManagerWorkspaces)(tree.root, (p) => (0, json_1.readJson)(tree, p, { expectComments: true })),
137
137
  ];
138
138
  const projectGlobPatterns = (0, retrieve_workspace_files_1.configurationGlobs)([
139
- { plugin: project_json_1.ProjectJsonProjectsPlugin },
140
- { plugin: (0, package_json_workspaces_1.getNxPackageJsonWorkspacesPlugin)(tree.root) },
139
+ project_json_1.ProjectJsonProjectsPlugin,
140
+ { createNodes: package_json_workspaces_1.createNodes },
141
141
  ]);
142
142
  const globbedFiles = (0, workspace_context_1.globWithWorkspaceContext)(tree.root, projectGlobPatterns);
143
143
  const createdFiles = findCreatedProjectFiles(tree, patterns);
@@ -5,10 +5,11 @@ const path_1 = require("path");
5
5
  const json_1 = require("../../generators/utils/json");
6
6
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
7
7
  const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-workspace-files");
8
- const nx_plugin_1 = require("../../utils/nx-plugin");
8
+ const internal_api_1 = require("../../project-graph/plugins/internal-api");
9
9
  async function default_1(tree) {
10
10
  const nxJson = (0, nx_json_1.readNxJson)(tree);
11
- const projectFiles = await (0, retrieve_workspace_files_1.retrieveProjectConfigurationPaths)(tree.root, await (0, nx_plugin_1.loadNxPlugins)(nxJson?.plugins));
11
+ const [plugins, cleanup] = await (0, internal_api_1.loadNxPlugins)(nxJson?.plugins ?? [], tree.root);
12
+ const projectFiles = (0, retrieve_workspace_files_1.retrieveProjectConfigurationPaths)(tree.root, plugins);
12
13
  const projectJsons = projectFiles.filter((f) => f.endsWith('project.json'));
13
14
  for (let f of projectJsons) {
14
15
  const projectJson = (0, json_1.readJson)(tree, f);
@@ -18,6 +19,7 @@ async function default_1(tree) {
18
19
  }
19
20
  }
20
21
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
22
+ cleanup();
21
23
  }
22
24
  exports.default = default_1;
23
25
  function toProjectName(directory, nxJson) {
@@ -28,7 +28,7 @@ function assertSupportedPlatform() {
28
28
  `This platform (${process.platform}-${process.arch}) is currently not supported by Nx.`,
29
29
  ];
30
30
  }
31
- bodyLines.push('For more information please see https://nx.dev/recipes/troubleshooting/troubleshoot-nx-install-issues');
31
+ bodyLines.push('For more information please see https://nx.dev/troubleshooting/troubleshoot-nx-install-issues');
32
32
  output_1.output.error({
33
33
  title,
34
34
  bodyLines,
@@ -1,4 +1,4 @@
1
- import { CreateDependencies, CreateNodes } from '../../utils/nx-plugin';
1
+ import { CreateDependencies, CreateNodes } from '../../project-graph/plugins';
2
2
  export declare const name = "nx/js/dependencies-and-lockfile";
3
3
  export declare const createNodes: CreateNodes;
4
4
  export declare const createDependencies: CreateDependencies;
@@ -6,7 +6,7 @@ import { PackageManager } from '../../../utils/package-manager';
6
6
  import { ProjectGraph, ProjectGraphExternalNode } from '../../../config/project-graph';
7
7
  import { RawProjectGraphDependency } from '../../../project-graph/project-graph-builder';
8
8
  import { PackageJson } from '../../../utils/package-json';
9
- import { CreateDependenciesContext, CreateNodesContext } from '../../../utils/nx-plugin';
9
+ import { CreateDependenciesContext, CreateNodesContext } from '../../../project-graph/plugins';
10
10
  export declare const LOCKFILES: string[];
11
11
  /**
12
12
  * Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
@@ -1,7 +1,7 @@
1
1
  import { NormalizedPackageJson } from './utils/package-json';
2
2
  import { RawProjectGraphDependency } from '../../../project-graph/project-graph-builder';
3
3
  import { ProjectGraph, ProjectGraphExternalNode } from '../../../config/project-graph';
4
- import { CreateDependenciesContext } from '../../../utils/nx-plugin';
4
+ import { CreateDependenciesContext } from '../../../project-graph/plugins';
5
5
  export declare function getNpmLockfileNodes(lockFileContent: string, lockFileHash: string): Record<string, ProjectGraphExternalNode>;
6
6
  export declare function getNpmLockfileDependencies(lockFileContent: string, lockFileHash: string, ctx: CreateDependenciesContext): RawProjectGraphDependency[];
7
7
  export declare function stringifyNpmLockfile(graph: ProjectGraph, rootLockFileContent: string, packageJson: NormalizedPackageJson): string;
@@ -1,7 +1,7 @@
1
1
  import { NormalizedPackageJson } from './utils/package-json';
2
2
  import { RawProjectGraphDependency } from '../../../project-graph/project-graph-builder';
3
3
  import { ProjectGraph, ProjectGraphExternalNode } from '../../../config/project-graph';
4
- import { CreateDependenciesContext } from '../../../utils/nx-plugin';
4
+ import { CreateDependenciesContext } from '../../../project-graph/plugins';
5
5
  export declare function getPnpmLockfileNodes(lockFileContent: string, lockFileHash: string): Record<string, ProjectGraphExternalNode>;
6
6
  export declare function getPnpmLockfileDependencies(lockFileContent: string, lockFileHash: string, ctx: CreateDependenciesContext): RawProjectGraphDependency[];
7
7
  export declare function stringifyPnpmLockfile(graph: ProjectGraph, rootLockFileContent: string, packageJson: NormalizedPackageJson): string;
@@ -1,7 +1,7 @@
1
1
  import { NormalizedPackageJson } from './utils/package-json';
2
2
  import { RawProjectGraphDependency } from '../../../project-graph/project-graph-builder';
3
3
  import { ProjectGraph, ProjectGraphExternalNode } from '../../../config/project-graph';
4
- import { CreateDependenciesContext } from '../../../utils/nx-plugin';
4
+ import { CreateDependenciesContext } from '../../../project-graph/plugins';
5
5
  export declare function getYarnLockfileNodes(lockFileContent: string, lockFileHash: string, packageJson: NormalizedPackageJson): Record<string, ProjectGraphExternalNode>;
6
6
  export declare function getYarnLockfileDependencies(lockFileContent: string, lockFileHash: string, ctx: CreateDependenciesContext): RawProjectGraphDependency[];
7
7
  export declare function stringifyYarnLockfile(graph: ProjectGraph, rootLockFileContent: string, packageJson: NormalizedPackageJson): string;
@@ -1,4 +1,4 @@
1
- import { CreateDependenciesContext } from '../../../../utils/nx-plugin';
1
+ import { CreateDependenciesContext } from '../../../../project-graph/plugins';
2
2
  import { RawProjectGraphDependency } from '../../../../project-graph/project-graph-builder';
3
3
  export declare function buildExplicitDependencies(jsPluginConfig: {
4
4
  analyzeSourceFiles?: boolean;
@@ -1,3 +1,3 @@
1
- import { CreateDependenciesContext } from '../../../../utils/nx-plugin';
1
+ import { CreateDependenciesContext } from '../../../../project-graph/plugins';
2
2
  import { RawProjectGraphDependency } from '../../../../project-graph/project-graph-builder';
3
3
  export declare function buildExplicitPackageJsonDependencies(ctx: CreateDependenciesContext): RawProjectGraphDependency[];
@@ -1,3 +1,3 @@
1
- import { CreateDependenciesContext } from '../../../../utils/nx-plugin';
1
+ import { CreateDependenciesContext } from '../../../../project-graph/plugins';
2
2
  import { RawProjectGraphDependency } from '../../../../project-graph/project-graph-builder';
3
3
  export declare function buildExplicitTypeScriptDependencies(ctx: CreateDependenciesContext): RawProjectGraphDependency[];
@@ -1,8 +1,8 @@
1
1
  import { NxJsonConfiguration } from '../../config/nx-json';
2
2
  import { ProjectConfiguration } from '../../config/workspace-json-project-json';
3
- import { NxPluginV2 } from '../../utils/nx-plugin';
4
3
  import { PackageJson } from '../../utils/package-json';
5
- export declare function getNxPackageJsonWorkspacesPlugin(root: string): NxPluginV2;
4
+ import { CreateNodes } from '../../project-graph/plugins';
5
+ export declare const createNodes: CreateNodes;
6
6
  export declare function createNodeFromPackageJson(pkgJsonPath: string, root: string): {
7
7
  projects: {
8
8
  [x: string]: ProjectConfiguration & {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGlobPatternsFromPackageManagerWorkspaces = exports.buildProjectConfigurationFromPackageJson = exports.createNodeFromPackageJson = exports.getNxPackageJsonWorkspacesPlugin = void 0;
3
+ exports.getGlobPatternsFromPackageManagerWorkspaces = exports.buildProjectConfigurationFromPackageJson = exports.createNodeFromPackageJson = exports.createNodes = void 0;
4
4
  const minimatch_1 = require("minimatch");
5
5
  const node_fs_1 = require("node:fs");
6
6
  const node_path_1 = require("node:path");
@@ -12,37 +12,30 @@ const logger_1 = require("../../utils/logger");
12
12
  const output_1 = require("../../utils/output");
13
13
  const package_json_1 = require("../../utils/package-json");
14
14
  const path_1 = require("../../utils/path");
15
- function getNxPackageJsonWorkspacesPlugin(root) {
16
- const readJson = (f) => (0, fileutils_1.readJsonFile)((0, node_path_1.join)(root, f));
17
- const patterns = getGlobPatternsFromPackageManagerWorkspaces(root, readJson);
18
- // If the user only specified a negative pattern, we should find all package.json
19
- // files and only return those that don't match a negative pattern.
20
- const negativePatterns = patterns.filter((p) => p.startsWith('!'));
21
- let positivePatterns = patterns.filter((p) => !p.startsWith('!'));
22
- if (
23
- // There are some negative patterns
24
- negativePatterns.length > 0 &&
25
- // No positive patterns
26
- (positivePatterns.length === 0 ||
27
- // Or only a single positive pattern that is the default coming from root package
28
- (positivePatterns.length === 1 && positivePatterns[0] === 'package.json'))) {
29
- positivePatterns.push('**/package.json');
30
- }
31
- return {
32
- name: 'nx/core/package-json-workspaces',
33
- createNodes: [
34
- (0, globs_1.combineGlobPatterns)(positivePatterns),
35
- (p) => {
36
- if (!negativePatterns.some((negative) => (0, minimatch_1.minimatch)(p, negative))) {
37
- return createNodeFromPackageJson(p, root);
38
- }
39
- // A negative pattern matched, so we should not create a node for this package.json
40
- return {};
41
- },
42
- ],
43
- };
15
+ const workspace_root_1 = require("../../utils/workspace-root");
16
+ const readJson = (f) => (0, fileutils_1.readJsonFile)((0, node_path_1.join)(workspace_root_1.workspaceRoot, f));
17
+ const patterns = getGlobPatternsFromPackageManagerWorkspaces(workspace_root_1.workspaceRoot, readJson);
18
+ const negativePatterns = patterns.filter((p) => p.startsWith('!'));
19
+ const positivePatterns = patterns.filter((p) => !p.startsWith('!'));
20
+ if (
21
+ // There are some negative patterns
22
+ negativePatterns.length > 0 &&
23
+ // No positive patterns
24
+ (positivePatterns.length === 0 ||
25
+ // Or only a single positive pattern that is the default coming from root package
26
+ (positivePatterns.length === 1 && positivePatterns[0] === 'package.json'))) {
27
+ positivePatterns.push('**/package.json');
44
28
  }
45
- exports.getNxPackageJsonWorkspacesPlugin = getNxPackageJsonWorkspacesPlugin;
29
+ exports.createNodes = [
30
+ (0, globs_1.combineGlobPatterns)(positivePatterns),
31
+ (p, _, { workspaceRoot }) => {
32
+ if (!negativePatterns.some((negative) => (0, minimatch_1.minimatch)(p, negative))) {
33
+ return createNodeFromPackageJson(p, workspaceRoot);
34
+ }
35
+ // A negative pattern matched, so we should not create a node for this package.json
36
+ return {};
37
+ },
38
+ ];
46
39
  function createNodeFromPackageJson(pkgJsonPath, root) {
47
40
  const json = (0, fileutils_1.readJsonFile)((0, node_path_1.join)(root, pkgJsonPath));
48
41
  const project = buildProjectConfigurationFromPackageJson(json, pkgJsonPath, (0, nx_json_1.readNxJson)(root));
@@ -1 +1,2 @@
1
1
  export * from './create-nodes';
2
+ export declare const name = "nx/core/package-json-workspaces";
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.name = void 0;
3
4
  const tslib_1 = require("tslib");
4
5
  tslib_1.__exportStar(require("./create-nodes"), exports);
6
+ exports.name = 'nx/core/package-json-workspaces';
@@ -1,2 +1,3 @@
1
- import { NxPluginV2 } from '../../../utils/nx-plugin';
1
+ import { NxPluginV2 } from '../../../project-graph/plugins';
2
2
  export declare const PackageJsonProjectsNextToProjectJsonPlugin: NxPluginV2;
3
+ export default PackageJsonProjectsNextToProjectJsonPlugin;
@@ -24,6 +24,7 @@ exports.PackageJsonProjectsNextToProjectJsonPlugin = {
24
24
  },
25
25
  ],
26
26
  };
27
+ exports.default = exports.PackageJsonProjectsNextToProjectJsonPlugin;
27
28
  function createProjectFromPackageJsonNextToProjectJson(projectJsonPath, workspaceRoot) {
28
29
  const root = (0, path_1.dirname)(projectJsonPath);
29
30
  const packageJsonPath = (0, path_1.join)(workspaceRoot, root, 'package.json');
@@ -1,4 +1,5 @@
1
1
  import { ProjectConfiguration } from '../../../config/workspace-json-project-json';
2
- import { NxPluginV2 } from '../../../utils/nx-plugin';
2
+ import { NxPluginV2 } from '../../../project-graph/plugins';
3
3
  export declare const ProjectJsonProjectsPlugin: NxPluginV2;
4
+ export default ProjectJsonProjectsPlugin;
4
5
  export declare function buildProjectFromProjectJson(json: Partial<ProjectConfiguration>, path: string): ProjectConfiguration;
@@ -19,6 +19,7 @@ exports.ProjectJsonProjectsPlugin = {
19
19
  },
20
20
  ],
21
21
  };
22
+ exports.default = exports.ProjectJsonProjectsPlugin;
22
23
  function buildProjectFromProjectJson(json, path) {
23
24
  return {
24
25
  name: (0, workspaces_1.toProjectName)(path),
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This marks that a target provides information which should modify a target already registered
3
+ * on the project via other plugins. If the target has not already been registered, and this symbol is true,
4
+ * the information provided by it will be discarded.
5
+ *
6
+ * NOTE: This cannot be a symbol, as they are not serialized in JSON the communication
7
+ * between the plugin-worker and the main process.
8
+ */
9
+ export declare const ONLY_MODIFIES_EXISTING_TARGET = "NX_ONLY_MODIFIES_EXISTING_TARGET";
10
+ /**
11
+ * This is used to override the source file for the target defaults plugin.
12
+ * This allows the plugin to use the project files as the context, but point to nx.json as the source file.
13
+ *
14
+ * NOTE: This cannot be a symbol, as they are not serialized in JSON the communication
15
+ * between the plugin-worker and the main process.
16
+ */
17
+ export declare const OVERRIDE_SOURCE_FILE = "NX_OVERRIDE_SOURCE_FILE";