nx 22.6.0 → 22.6.1

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 (141) hide show
  1. package/bin/nx.js +13 -8
  2. package/package.json +11 -12
  3. package/src/adapter/ngcli-adapter.d.ts +8 -5
  4. package/src/adapter/ngcli-adapter.d.ts.map +1 -1
  5. package/src/adapter/ngcli-adapter.js +29 -15
  6. package/src/ai/clone-ai-config-repo.d.ts.map +1 -1
  7. package/src/ai/clone-ai-config-repo.js +2 -0
  8. package/src/command-line/add/add.js +1 -1
  9. package/src/command-line/examples.d.ts +7 -0
  10. package/src/command-line/examples.d.ts.map +1 -1
  11. package/src/command-line/examples.js +29 -1
  12. package/src/command-line/exec/exec.js +3 -3
  13. package/src/command-line/format/format.js +3 -3
  14. package/src/command-line/generate/generate.d.ts.map +1 -1
  15. package/src/command-line/generate/generate.js +1 -1
  16. package/src/command-line/graph/graph.js +1 -1
  17. package/src/command-line/init/command-object.js +1 -21
  18. package/src/command-line/init/configure-plugins.js +1 -1
  19. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -1
  20. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +2 -2
  21. package/src/command-line/init/implementation/deduce-default-base.js +5 -5
  22. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +2 -2
  23. package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
  24. package/src/command-line/init/implementation/utils.d.ts +1 -2
  25. package/src/command-line/init/implementation/utils.d.ts.map +1 -1
  26. package/src/command-line/init/implementation/utils.js +1 -15
  27. package/src/command-line/init/init-v1.d.ts +0 -3
  28. package/src/command-line/init/init-v1.d.ts.map +1 -1
  29. package/src/command-line/init/init-v1.js +1 -27
  30. package/src/command-line/init/init-v2.d.ts +0 -1
  31. package/src/command-line/init/init-v2.d.ts.map +1 -1
  32. package/src/command-line/init/init-v2.js +7 -35
  33. package/src/command-line/mcp/mcp.d.ts.map +1 -1
  34. package/src/command-line/mcp/mcp.js +2 -0
  35. package/src/command-line/migrate/migrate-ui-api.d.ts.map +1 -1
  36. package/src/command-line/migrate/migrate-ui-api.js +13 -0
  37. package/src/command-line/migrate/migrate.d.ts.map +1 -1
  38. package/src/command-line/migrate/migrate.js +16 -14
  39. package/src/command-line/migrate/run-migration-process.js +2 -0
  40. package/src/command-line/nx-cloud/connect/view-logs.js +1 -1
  41. package/src/command-line/nx-commands.js +65 -65
  42. package/src/command-line/release/config/version-plans.js +1 -1
  43. package/src/command-line/release/utils/exec-command.js +1 -1
  44. package/src/command-line/release/utils/launch-editor.js +2 -2
  45. package/src/command-line/release/utils/remote-release-clients/github.d.ts.map +1 -1
  46. package/src/command-line/release/utils/remote-release-clients/github.js +2 -1
  47. package/src/command-line/release/utils/remote-release-clients/gitlab.d.ts.map +1 -1
  48. package/src/command-line/release/utils/remote-release-clients/gitlab.js +1 -0
  49. package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
  50. package/src/command-line/release/version/release-group-processor.js +2 -4
  51. package/src/command-line/release/version.js +1 -1
  52. package/src/command-line/run/run.d.ts.map +1 -1
  53. package/src/command-line/run/run.js +2 -2
  54. package/src/command-line/watch/watch.js +1 -1
  55. package/src/core/graph/main.js +1 -1
  56. package/src/daemon/client/client.d.ts +1 -1
  57. package/src/daemon/client/client.d.ts.map +1 -1
  58. package/src/daemon/client/client.js +3 -2
  59. package/src/daemon/client/generate-help-output.js +1 -1
  60. package/src/daemon/server/handle-configure-ai-agents.js +11 -4
  61. package/src/daemon/server/handle-hash-tasks.d.ts +1 -0
  62. package/src/daemon/server/handle-hash-tasks.d.ts.map +1 -1
  63. package/src/daemon/server/handle-hash-tasks.js +1 -1
  64. package/src/daemon/server/shutdown-utils.js +1 -1
  65. package/src/executors/run-commands/run-commands.impl.d.ts.map +1 -1
  66. package/src/executors/run-commands/run-commands.impl.js +60 -7
  67. package/src/executors/run-commands/running-tasks.d.ts.map +1 -1
  68. package/src/executors/run-commands/running-tasks.js +1 -5
  69. package/src/executors/run-script/run-script.impl.js +1 -1
  70. package/src/hasher/native-task-hasher-impl.d.ts +2 -2
  71. package/src/hasher/native-task-hasher-impl.d.ts.map +1 -1
  72. package/src/hasher/native-task-hasher-impl.js +6 -6
  73. package/src/hasher/task-hasher.d.ts +4 -4
  74. package/src/hasher/task-hasher.d.ts.map +1 -1
  75. package/src/hasher/task-hasher.js +9 -6
  76. package/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  77. package/src/native/nx.wasm32-wasi.wasm +0 -0
  78. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -1
  79. package/src/plugins/js/lock-file/bun-parser.js +1 -1
  80. package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
  81. package/src/plugins/js/lock-file/lock-file.js +3 -1
  82. package/src/project-graph/file-utils.d.ts.map +1 -1
  83. package/src/project-graph/file-utils.js +4 -2
  84. package/src/tasks-runner/cache.js +1 -1
  85. package/src/tasks-runner/task-orchestrator.d.ts +4 -2
  86. package/src/tasks-runner/task-orchestrator.d.ts.map +1 -1
  87. package/src/tasks-runner/task-orchestrator.js +59 -32
  88. package/src/utils/ab-testing.js +1 -1
  89. package/src/utils/analytics-prompt.d.ts.map +1 -1
  90. package/src/utils/analytics-prompt.js +2 -0
  91. package/src/utils/child-process.d.ts.map +1 -1
  92. package/src/utils/child-process.js +1 -2
  93. package/src/utils/command-line-utils.js +3 -3
  94. package/src/utils/default-base.js +1 -1
  95. package/src/utils/git-utils.d.ts.map +1 -1
  96. package/src/utils/git-utils.index-filter.js +2 -2
  97. package/src/utils/git-utils.js +6 -5
  98. package/src/utils/git-utils.tree-filter.js +1 -1
  99. package/src/utils/machine-id-cache.d.ts.map +1 -1
  100. package/src/utils/machine-id-cache.js +72 -2
  101. package/src/utils/package-manager.d.ts.map +1 -1
  102. package/src/utils/package-manager.js +8 -13
  103. package/src/utils/require-nx-key.js +1 -1
  104. package/src/utils/serialize-overrides-into-command-line.d.ts.map +1 -1
  105. package/src/utils/serialize-overrides-into-command-line.js +3 -4
  106. package/src/utils/shell-quoting.d.ts +11 -0
  107. package/src/utils/shell-quoting.d.ts.map +1 -0
  108. package/src/utils/shell-quoting.js +41 -0
  109. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.d.ts +0 -2
  110. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.d.ts.map +0 -1
  111. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +0 -21
  112. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.d.ts +0 -2
  113. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.d.ts.map +0 -1
  114. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +0 -20
  115. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.d.ts +0 -2
  116. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.d.ts.map +0 -1
  117. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +0 -17
  118. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.d.ts +0 -2
  119. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.d.ts.map +0 -1
  120. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +0 -20
  121. package/src/command-line/init/implementation/react/clean-up-files.d.ts +0 -2
  122. package/src/command-line/init/implementation/react/clean-up-files.d.ts.map +0 -1
  123. package/src/command-line/init/implementation/react/clean-up-files.js +0 -30
  124. package/src/command-line/init/implementation/react/index.d.ts +0 -5
  125. package/src/command-line/init/implementation/react/index.d.ts.map +0 -1
  126. package/src/command-line/init/implementation/react/index.js +0 -77
  127. package/src/command-line/init/implementation/react/read-name-from-package-json.d.ts +0 -2
  128. package/src/command-line/init/implementation/react/read-name-from-package-json.d.ts.map +0 -1
  129. package/src/command-line/init/implementation/react/read-name-from-package-json.js +0 -16
  130. package/src/command-line/init/implementation/react/rename-js-to-jsx.d.ts +0 -2
  131. package/src/command-line/init/implementation/react/rename-js-to-jsx.d.ts.map +0 -1
  132. package/src/command-line/init/implementation/react/rename-js-to-jsx.js +0 -22
  133. package/src/command-line/init/implementation/react/tsconfig-setup.d.ts +0 -2
  134. package/src/command-line/init/implementation/react/tsconfig-setup.d.ts.map +0 -1
  135. package/src/command-line/init/implementation/react/tsconfig-setup.js +0 -108
  136. package/src/command-line/init/implementation/react/write-vite-config.d.ts +0 -2
  137. package/src/command-line/init/implementation/react/write-vite-config.d.ts.map +0 -1
  138. package/src/command-line/init/implementation/react/write-vite-config.js +0 -53
  139. package/src/command-line/init/implementation/react/write-vite-index-html.d.ts +0 -2
  140. package/src/command-line/init/implementation/react/write-vite-index-html.d.ts.map +0 -1
  141. package/src/command-line/init/implementation/react/write-vite-index-html.js +0 -24
package/bin/nx.js CHANGED
@@ -76,23 +76,21 @@ async function main() {
76
76
  if (!localNx && !isNxCloudCommand(process.argv[2])) {
77
77
  handleMissingLocalInstallation(workspace ? workspace.dir : null);
78
78
  }
79
- // Prompt for analytics preference if not set
80
- try {
81
- await (0, analytics_prompt_1.ensureAnalyticsPreferenceSet)();
82
- }
83
- catch { }
84
- await (0, analytics_1.startAnalytics)();
85
79
  // this file is already in the local workspace
86
80
  if (isNxCloudCommand(process.argv[2])) {
81
+ await initAnalytics();
87
82
  // nx-cloud commands can run without local Nx installation
88
83
  process.env.NX_DAEMON = 'false';
89
84
  require('nx/src/command-line/nx-commands').commandsObject.argv;
90
85
  }
91
86
  else if (isLocalInstall) {
87
+ await initAnalytics();
92
88
  await (0, init_local_1.initLocal)(workspace);
93
89
  }
94
90
  else if (localNx) {
95
91
  // Nx is being run from globally installed CLI - hand off to the local
92
+ // Don't start analytics or connect to the DB here — the local Nx
93
+ // will handle it when it runs its own bin/nx.ts
96
94
  warnIfUsingOutdatedGlobalInstall(GLOBAL_NX_VERSION, LOCAL_NX_VERSION);
97
95
  if (localNx.includes('.nx')) {
98
96
  const nxWrapperPath = localNx.replace(/\.nx.*/, '.nx/') + 'nxw.js';
@@ -169,6 +167,13 @@ function isNxCloudCommand(command) {
169
167
  ];
170
168
  return nxCloudCommands.includes(command);
171
169
  }
170
+ async function initAnalytics() {
171
+ try {
172
+ await (0, analytics_prompt_1.ensureAnalyticsPreferenceSet)();
173
+ }
174
+ catch { }
175
+ await (0, analytics_1.startAnalytics)();
176
+ }
172
177
  function handleMissingLocalInstallation(detectedWorkspaceRoot) {
173
178
  output_1.output.error({
174
179
  title: detectedWorkspaceRoot
@@ -231,7 +236,7 @@ function getLocalNxVersion(workspace) {
231
236
  function _getLatestVersionOfNx() {
232
237
  try {
233
238
  return (0, child_process_1.execSync)('npm view nx@latest version', {
234
- windowsHide: false,
239
+ windowsHide: true,
235
240
  })
236
241
  .toString()
237
242
  .trim();
@@ -239,7 +244,7 @@ function _getLatestVersionOfNx() {
239
244
  catch {
240
245
  try {
241
246
  return (0, child_process_1.execSync)('pnpm view nx@latest version', {
242
- windowsHide: false,
247
+ windowsHide: true,
243
248
  })
244
249
  .toString()
245
250
  .trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "22.6.0",
3
+ "version": "22.6.1",
4
4
  "private": false,
5
5
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
6
6
  "repository": {
@@ -56,7 +56,6 @@
56
56
  "jsonc-parser": "3.2.0",
57
57
  "lines-and-columns": "2.0.3",
58
58
  "minimatch": "10.2.4",
59
- "node-machine-id": "1.1.12",
60
59
  "npm-run-path": "^4.0.1",
61
60
  "open": "^8.4.0",
62
61
  "ora": "5.3.0",
@@ -85,16 +84,16 @@
85
84
  }
86
85
  },
87
86
  "optionalDependencies": {
88
- "@nx/nx-darwin-arm64": "22.6.0",
89
- "@nx/nx-darwin-x64": "22.6.0",
90
- "@nx/nx-freebsd-x64": "22.6.0",
91
- "@nx/nx-linux-arm-gnueabihf": "22.6.0",
92
- "@nx/nx-linux-arm64-gnu": "22.6.0",
93
- "@nx/nx-linux-arm64-musl": "22.6.0",
94
- "@nx/nx-linux-x64-gnu": "22.6.0",
95
- "@nx/nx-linux-x64-musl": "22.6.0",
96
- "@nx/nx-win32-arm64-msvc": "22.6.0",
97
- "@nx/nx-win32-x64-msvc": "22.6.0"
87
+ "@nx/nx-darwin-arm64": "22.6.1",
88
+ "@nx/nx-darwin-x64": "22.6.1",
89
+ "@nx/nx-freebsd-x64": "22.6.1",
90
+ "@nx/nx-linux-arm-gnueabihf": "22.6.1",
91
+ "@nx/nx-linux-arm64-gnu": "22.6.1",
92
+ "@nx/nx-linux-arm64-musl": "22.6.1",
93
+ "@nx/nx-linux-x64-gnu": "22.6.1",
94
+ "@nx/nx-linux-x64-musl": "22.6.1",
95
+ "@nx/nx-win32-arm64-msvc": "22.6.1",
96
+ "@nx/nx-win32-x64-msvc": "22.6.1"
98
97
  },
99
98
  "nx-migrations": {
100
99
  "migrations": "./migrations.json",
@@ -4,6 +4,7 @@ import { Observable } from 'rxjs';
4
4
  import type { GenerateOptions } from '../command-line/generate/generate';
5
5
  import { ProjectConfiguration } from '../config/workspace-json-project-json';
6
6
  import { Tree } from '../generators/tree';
7
+ import type { ProjectGraph } from '../config/project-graph';
7
8
  import { ExecutorContext, GeneratorCallback } from '../config/misc-interfaces';
8
9
  export declare function createBuilderContext(builderInfo: {
9
10
  builderName: string;
@@ -16,13 +17,14 @@ export declare function scheduleTarget(root: string, opts: {
16
17
  configuration: string;
17
18
  runOptions: any;
18
19
  projects: Record<string, ProjectConfiguration>;
19
- }, verbose: boolean): Promise<Observable<import('@angular-devkit/architect').BuilderOutput>>;
20
+ }, verbose: boolean, projectGraph: ProjectGraph): Promise<Observable<import('@angular-devkit/architect').BuilderOutput>>;
20
21
  type AngularProjectConfiguration = ProjectConfiguration & {
21
22
  prefix?: string;
22
23
  };
23
24
  export declare class NxScopedHost extends virtualFs.ScopedHost<any> {
24
25
  private root;
25
- constructor(root: string);
26
+ protected _projectGraph?: ProjectGraph;
27
+ constructor(root: string, _projectGraph?: ProjectGraph);
26
28
  read(path: Path): Observable<FileBuffer>;
27
29
  protected readMergedWorkspaceConfiguration(): Observable<any>;
28
30
  write(path: Path, content: FileBuffer): Observable<void>;
@@ -37,6 +39,7 @@ export declare class NxScopedHost extends virtualFs.ScopedHost<any> {
37
39
  * the project graph to access the expanded targets.
38
40
  */
39
41
  export declare class NxScopedHostForBuilders extends NxScopedHost {
42
+ constructor(root: string, projectGraph: ProjectGraph);
40
43
  protected readMergedWorkspaceConfiguration(): Observable<any>;
41
44
  }
42
45
  export declare function arrayBufferToString(buffer: any): string;
@@ -46,15 +49,15 @@ export declare function arrayBufferToString(buffer: any): string;
46
49
  */
47
50
  export declare class NxScopeHostUsedForWrappedSchematics extends NxScopedHost {
48
51
  private readonly host;
49
- constructor(root: string, host: Tree);
52
+ constructor(root: string, host: Tree, projectGraph: ProjectGraph);
50
53
  read(path: Path): Observable<FileBuffer>;
51
54
  exists(path: Path): Observable<boolean>;
52
55
  isDirectory(path: Path): Observable<boolean>;
53
56
  isFile(path: Path): Observable<boolean>;
54
57
  list(path: Path): Observable<PathFragment[]>;
55
58
  }
56
- export declare function generate(root: string, opts: GenerateOptions, projects: Record<string, ProjectConfiguration>, verbose: boolean): Promise<number>;
57
- export declare function runMigration(root: string, packageName: string, migrationName: string, projects: Record<string, ProjectConfiguration>, isVerbose: boolean): Promise<{
59
+ export declare function generate(root: string, opts: GenerateOptions, projects: Record<string, ProjectConfiguration>, verbose: boolean, projectGraph: ProjectGraph): Promise<number>;
60
+ export declare function runMigration(root: string, packageName: string, migrationName: string, projects: Record<string, ProjectConfiguration>, isVerbose: boolean, projectGraph: ProjectGraph): Promise<{
58
61
  loggingQueue: string[];
59
62
  madeChanges: boolean;
60
63
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"ngcli-adapter.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/ngcli-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,OAAO,EAEP,IAAI,EACJ,YAAY,EAGZ,SAAS,EAEV,MAAM,sBAAsB,CAAC;AA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,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAC9C,SAAS,EAAE,OAAO,EAClB,YAAY,EAAE,YAAY;;;GAgC3B;AA4CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE;IACnD,CAAC,IAAI,EAAE,MAAM,GAAG,CACd,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,KACnC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,QAEA;AAED,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,IAcnB,MAAM,IAAI,EACV,kBAAkB;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,KACrC,OAAO,CAAC,iBAAiB,CAAC,CAwG9B;AAID,eAAO,MAAM,SAAS,GAAI,mBAAiB,KAAG,OAAO,CAAC,MAqBrD,CAAC;AA2MF;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,EACxE,UAAU,EAAE,CAAC,EACb,eAAe,EAAE,CAAC,EAClB,OAAO,EAAE,oBAAoB,GAC5B,CAAC,CAkDH"}
@@ -30,9 +30,17 @@ const executor_utils_1 = require("../command-line/run/executor-utils");
30
30
  const plugins_1 = require("../project-graph/plugins");
31
31
  const schema_utils_1 = require("../config/schema-utils");
32
32
  const project_configuration_utils_1 = require("../project-graph/utils/project-configuration-utils");
33
+ function getProjectGraph() {
34
+ try {
35
+ return Promise.resolve((0, project_graph_1.readCachedProjectGraph)());
36
+ }
37
+ catch {
38
+ return (0, project_graph_1.createProjectGraphAsync)();
39
+ }
40
+ }
33
41
  async function createBuilderContext(builderInfo, context) {
34
42
  require('./compat');
35
- const fsHost = new NxScopedHostForBuilders(context.root);
43
+ const fsHost = new NxScopedHostForBuilders(context.root, context.projectGraph);
36
44
  // the top level import is not patched because it is imported before the
37
45
  // patching happens so we require it here to use the patched version below
38
46
  const { workspaces } = require('@angular-devkit/core');
@@ -120,10 +128,10 @@ async function createBuilderContext(builderInfo, context) {
120
128
  };
121
129
  return builderContext;
122
130
  }
123
- async function scheduleTarget(root, opts, verbose) {
131
+ async function scheduleTarget(root, opts, verbose, projectGraph) {
124
132
  const { Architect } = require('@angular-devkit/architect');
125
133
  const logger = (0, exports.getLogger)(verbose);
126
- const fsHost = new NxScopedHostForBuilders(root);
134
+ const fsHost = new NxScopedHostForBuilders(root, projectGraph);
127
135
  const { workspace } = await core_1.workspaces.readWorkspace('angular.json', core_1.workspaces.createWorkspaceHost(fsHost));
128
136
  const architectHost = await getWrappedWorkspaceNodeModulesArchitectHost(workspace, root, opts.projects);
129
137
  const project = workspace.projects.get(opts.project);
@@ -269,21 +277,24 @@ async function runSchematic(host, root, workflow, logger, opts, schematic, print
269
277
  return { status: 0, loggingQueue: record.loggingQueue };
270
278
  }
271
279
  class NxScopedHost extends core_1.virtualFs.ScopedHost {
272
- constructor(root) {
280
+ constructor(root, _projectGraph) {
273
281
  super(new node_1.NodeJsSyncHost(), (0, core_1.normalize)(root));
274
282
  this.root = root;
283
+ this._projectGraph = _projectGraph;
275
284
  }
276
285
  read(path) {
277
286
  if ((path === 'angular.json' || path === '/angular.json') &&
278
287
  (0, angular_json_1.isAngularPluginInstalled)()) {
279
- return this.readMergedWorkspaceConfiguration().pipe((0, operators_1.map)((r) => stringToArrayBuffer(JSON.stringify((0, angular_json_1.toOldFormat)(r)))));
288
+ return this.readMergedWorkspaceConfiguration().pipe(
289
+ // structuredClone to avoid toOldFormat mutating shared graph objects
290
+ (0, operators_1.map)((r) => stringToArrayBuffer(JSON.stringify((0, angular_json_1.toOldFormat)(structuredClone(r))))));
280
291
  }
281
292
  else {
282
293
  return super.read(path);
283
294
  }
284
295
  }
285
296
  readMergedWorkspaceConfiguration() {
286
- return (0, rxjs_1.zip)((0, rxjs_1.from)((0, project_graph_1.createProjectGraphAsync)()), this.readExistingAngularJson(), this.readJson('nx.json')).pipe((0, operators_1.concatMap)(([graph, angularJson, nxJson]) => {
297
+ return (0, rxjs_1.zip)(this._projectGraph ? (0, rxjs_1.of)(this._projectGraph) : (0, rxjs_1.from)(getProjectGraph()), this.readExistingAngularJson(), this.readJson('nx.json')).pipe((0, operators_1.concatMap)(([graph, angularJson, nxJson]) => {
287
298
  const workspaceConfig = (angularJson || { projects: {} });
288
299
  workspaceConfig.cli ??= nxJson.cli;
289
300
  workspaceConfig.schematics ??= nxJson.generators;
@@ -437,8 +448,11 @@ exports.NxScopedHost = NxScopedHost;
437
448
  * the project graph to access the expanded targets.
438
449
  */
439
450
  class NxScopedHostForBuilders extends NxScopedHost {
451
+ constructor(root, projectGraph) {
452
+ super(root, projectGraph);
453
+ }
440
454
  readMergedWorkspaceConfiguration() {
441
- return (0, rxjs_1.zip)((0, rxjs_1.from)((0, project_graph_1.createProjectGraphAsync)()), this.readExistingAngularJson(), this.readJson('nx.json')).pipe((0, operators_1.map)(([graph, angularJson, nxJson]) => {
455
+ return (0, rxjs_1.zip)((0, rxjs_1.of)(this._projectGraph), this.readExistingAngularJson(), this.readJson('nx.json')).pipe((0, operators_1.map)(([graph, angularJson, nxJson]) => {
442
456
  const workspaceConfig = (angularJson || { projects: {} });
443
457
  workspaceConfig.cli ??= nxJson.cli;
444
458
  workspaceConfig.schematics ??= nxJson.generators;
@@ -472,8 +486,8 @@ function arrayBufferToString(buffer) {
472
486
  * the project configuration files.
473
487
  */
474
488
  class NxScopeHostUsedForWrappedSchematics extends NxScopedHost {
475
- constructor(root, host) {
476
- super(root);
489
+ constructor(root, host, projectGraph) {
490
+ super(root, projectGraph);
477
491
  this.host = host;
478
492
  }
479
493
  read(path) {
@@ -566,9 +580,9 @@ function findMatchingFileChange(host, path) {
566
580
  .listChanges()
567
581
  .find((f) => f.type !== 'DELETE' && (0, core_1.normalize)(f.path) === targetPath);
568
582
  }
569
- async function generate(root, opts, projects, verbose) {
583
+ async function generate(root, opts, projects, verbose, projectGraph) {
570
584
  const logger = (0, exports.getLogger)(verbose);
571
- const fsHost = new NxScopeHostUsedForWrappedSchematics(root, new tree_1.FsTree(root, verbose, `ng-cli generator: ${opts.collectionName}:${opts.generatorName}`));
585
+ const fsHost = new NxScopeHostUsedForWrappedSchematics(root, new tree_1.FsTree(root, verbose, `ng-cli generator: ${opts.collectionName}:${opts.generatorName}`), projectGraph);
572
586
  const workflow = createWorkflow(fsHost, root, opts, projects);
573
587
  const collection = getCollection(workflow, opts.collectionName);
574
588
  const schematic = collection.createSchematic(opts.generatorName, true);
@@ -623,9 +637,9 @@ function createPromptProvider() {
623
637
  return require('enquirer').prompt(questions);
624
638
  };
625
639
  }
626
- async function runMigration(root, packageName, migrationName, projects, isVerbose) {
640
+ async function runMigration(root, packageName, migrationName, projects, isVerbose, projectGraph) {
627
641
  const logger = (0, exports.getLogger)(isVerbose);
628
- const fsHost = new NxScopeHostUsedForWrappedSchematics(root, new tree_1.FsTree(root, isVerbose, `ng-cli migration: ${packageName}:${migrationName}`));
642
+ const fsHost = new NxScopeHostUsedForWrappedSchematics(root, new tree_1.FsTree(root, isVerbose, `ng-cli migration: ${packageName}:${migrationName}`), projectGraph);
629
643
  const workflow = createWorkflow(fsHost, root, {}, projects);
630
644
  const collection = resolveMigrationsCollection(packageName);
631
645
  const record = { loggingQueue: [], error: false };
@@ -713,7 +727,7 @@ function wrapAngularDevkitSchematic(collectionName, generatorName) {
713
727
  // were written with Nx in mind, and may care about tags.
714
728
  require('./compat');
715
729
  return async (host, generatorOptions) => {
716
- const graph = await (0, project_graph_1.createProjectGraphAsync)();
730
+ const graph = await getProjectGraph();
717
731
  const { projects } = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(graph);
718
732
  if (mockedSchematics &&
719
733
  mockedSchematics[`${collectionName}:${generatorName}`]) {
@@ -744,7 +758,7 @@ function wrapAngularDevkitSchematic(collectionName, generatorName) {
744
758
  host.rename(eventPath, event.to);
745
759
  }
746
760
  };
747
- const fsHost = new NxScopeHostUsedForWrappedSchematics(host.root, host);
761
+ const fsHost = new NxScopeHostUsedForWrappedSchematics(host.root, host, graph);
748
762
  const logger = (0, exports.getLogger)(generatorOptions.verbose);
749
763
  const options = {
750
764
  generatorOptions,
@@ -1 +1 @@
1
- {"version":3,"file":"clone-ai-config-repo.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/clone-ai-config-repo.ts"],"names":[],"mappings":"AAuHA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAiB5C"}
1
+ {"version":3,"file":"clone-ai-config-repo.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/ai/clone-ai-config-repo.ts"],"names":[],"mappings":"AAyHA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAiB5C"}
@@ -17,6 +17,7 @@ function getLatestCommitHash() {
17
17
  encoding: 'utf-8',
18
18
  stdio: ['pipe', 'pipe', 'pipe'],
19
19
  timeout: 30000, // 30 second timeout
20
+ windowsHide: true,
20
21
  });
21
22
  const hash = output.split('\t')[0];
22
23
  if (!hash || hash.length < 10) {
@@ -46,6 +47,7 @@ function cloneRepo(targetPath) {
46
47
  encoding: 'utf-8',
47
48
  stdio: ['pipe', 'pipe', 'pipe'],
48
49
  timeout: 120000, // 2 minute timeout for clone
50
+ windowsHide: true,
49
51
  });
50
52
  // Remove .git directory after clone
51
53
  const gitDir = (0, path_1.join)(tempPath, '.git');
@@ -42,7 +42,7 @@ async function installPackage(pkgName, version, nxJson) {
42
42
  ? `${pmc.addDev} ${pkgName}`
43
43
  : `${pmc.addDev} ${pkgName}@${version}`;
44
44
  await new Promise((resolve) => (0, child_process_1.exec)(command, {
45
- windowsHide: false,
45
+ windowsHide: true,
46
46
  }, (error, stdout, stderr) => {
47
47
  if (error) {
48
48
  spinner.fail();
@@ -2,5 +2,12 @@ export interface Example {
2
2
  command: string;
3
3
  description: string;
4
4
  }
5
+ export interface CliDocsCommandMetadata {
6
+ supportedVersionRange?: string;
7
+ }
8
+ /**
9
+ * Docs-only metadata keyed by the full command name as rendered in the CLI docs.
10
+ */
11
+ export declare const cliDocsCommandMetadata: Record<string, CliDocsCommandMetadata>;
5
12
  export declare const examples: Record<string, Example[]>;
6
13
  //# sourceMappingURL=examples.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/examples.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAgc9C,CAAC"}
1
+ {"version":3,"file":"examples.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/examples.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAIzE,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CA8d9C,CAAC"}
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.examples = void 0;
3
+ exports.examples = exports.cliDocsCommandMetadata = void 0;
4
+ /**
5
+ * Docs-only metadata keyed by the full command name as rendered in the CLI docs.
6
+ */
7
+ exports.cliDocsCommandMetadata = {
8
+ 'show target': {
9
+ supportedVersionRange: 'Nx 22.6+',
10
+ },
11
+ };
4
12
  exports.examples = {
5
13
  affected: [
6
14
  {
@@ -343,6 +351,26 @@ exports.examples = {
343
351
  command: 'show project my-app --web',
344
352
  description: 'Opens a web browser to explore the configuration of "my-app"',
345
353
  },
354
+ {
355
+ command: 'show target my-app:build',
356
+ description: 'Prints the specified + inferred configuration for `my-app:build`',
357
+ },
358
+ {
359
+ command: 'show target my-app:build inputs',
360
+ description: 'Prints the resolved inputs for `my-app:build`',
361
+ },
362
+ {
363
+ command: 'show target my-app:build inputs --check packages/my-app/index.html',
364
+ description: 'Checks if `packages/my-app/index.html` is an input for `my-app:build`',
365
+ },
366
+ {
367
+ command: 'show target my-app:build outputs',
368
+ description: 'Prints the outputs detected on disk for `my-app:build`',
369
+ },
370
+ {
371
+ command: 'show target my-app:build outputs --check packages/my-app/dist/index.html',
372
+ description: 'Checks if `packages/my-app/dist/index.html` is an output for `my-app:build`',
373
+ },
346
374
  ],
347
375
  watch: [
348
376
  {
@@ -34,7 +34,7 @@ async function nxExecCommand(args) {
34
34
  NX_PROJECT_NAME: process.env.NX_TASK_TARGET_PROJECT,
35
35
  NX_PROJECT_ROOT_PATH: projectGraph.nodes?.[process.env.NX_TASK_TARGET_PROJECT]?.data?.root,
36
36
  },
37
- windowsHide: false,
37
+ windowsHide: true,
38
38
  });
39
39
  }
40
40
  else {
@@ -67,7 +67,7 @@ async function runScriptAsNxTarget(projectGraph, argv, nxArgs) {
67
67
  cwd: projectGraph.nodes?.[projectName]?.data?.root
68
68
  ? (0, path_2.joinPathFragments)(workspace_root_1.workspaceRoot, projectGraph.nodes?.[projectName]?.data?.root)
69
69
  : workspace_root_1.workspaceRoot,
70
- windowsHide: false,
70
+ windowsHide: true,
71
71
  });
72
72
  });
73
73
  }
@@ -81,7 +81,7 @@ function runTargetOnProject(scriptDefinition, targetName, project, projectName,
81
81
  const command = `${pm.exec} nx run ${projectName}:\\\"${targetName}\\\" ${extraArgs.join(' ')}`;
82
82
  (0, child_process_1.execSync)(command, {
83
83
  stdio: 'inherit',
84
- windowsHide: false,
84
+ windowsHide: true,
85
85
  });
86
86
  }
87
87
  function readScriptArgV(overrides) {
@@ -152,12 +152,12 @@ function write(prettier, patterns) {
152
152
  : '';
153
153
  (0, node_child_process_1.execSync)(`node "${prettierPath}" --write ${listDifferentArg}${regularPatterns.join(' ')}`, {
154
154
  stdio: [0, 1, 2],
155
- windowsHide: false,
155
+ windowsHide: true,
156
156
  });
157
157
  if (swcrcPatterns.length > 0) {
158
158
  (0, node_child_process_1.execSync)(`node "${prettierPath}" --write ${listDifferentArg}${swcrcPatterns.join(' ')} --parser json`, {
159
159
  stdio: [0, 1, 2],
160
- windowsHide: false,
160
+ windowsHide: true,
161
161
  });
162
162
  }
163
163
  }
@@ -168,7 +168,7 @@ async function check(patterns) {
168
168
  }
169
169
  const prettierPath = getPrettierPath();
170
170
  return new Promise((resolve, reject) => {
171
- (0, node_child_process_1.exec)(`node "${prettierPath}" --list-different ${patterns.join(' ')}`, { encoding: 'utf-8', windowsHide: false }, (error, stdout) => {
171
+ (0, node_child_process_1.exec)(`node "${prettierPath}" --list-different ${patterns.join(' ')}`, { encoding: 'utf-8', windowsHide: true }, (error, stdout) => {
172
172
  if (error) {
173
173
  // The command failed because Prettier threw an error.
174
174
  if (stdout.length === 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/generate/generate.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAwB,MAAM,uBAAuB,CAAC;AAMzE,OAAO,EAEL,OAAO,EACP,MAAM,EACP,MAAM,oBAAoB,CAAC;AAW5B,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,YAAY,CAAC,WAAW,EAAE,UAAU,EAAE,QAUrD;AAwJD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAaA;AAmED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,MAAM,EAC/B,OAAO,EAAE,MAAM,EAAE,QAelB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,mBA0HxD"}
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/generate/generate.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAwB,MAAM,uBAAuB,CAAC;AAMzE,OAAO,EAEL,OAAO,EACP,MAAM,EACP,MAAM,oBAAoB,CAAC;AAW5B,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,YAAY,CAAC,WAAW,EAAE,UAAU,EAAE,QAUrD;AAwJD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAaA;AAmED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,MAAM,EACd,uBAAuB,EAAE,MAAM,EAC/B,OAAO,EAAE,MAAM,EAAE,QAelB;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,mBA2HxD"}
@@ -260,7 +260,7 @@ async function generate(args) {
260
260
  return (await Promise.resolve().then(() => require('../../adapter/ngcli-adapter'))).generate(workspace_root_1.workspaceRoot, {
261
261
  ...opts,
262
262
  generatorOptions: combinedOpts,
263
- }, projectsConfigurations.projects, args.verbose);
263
+ }, projectsConfigurations.projects, args.verbose, projectGraph);
264
264
  }
265
265
  });
266
266
  }
@@ -966,6 +966,6 @@ function getHelpTextFromTarget(projectName, targetName) {
966
966
  throw new Error(`No help command found for ${projectName}:${targetName}`);
967
967
  return (0, node_child_process_1.execSync)(command, {
968
968
  cwd: target.options?.cwd ?? workspace_root_1.workspaceRoot,
969
- windowsHide: false,
969
+ windowsHide: true,
970
970
  }).toString();
971
971
  }
@@ -77,11 +77,6 @@ async function withInitOptions(yargs) {
77
77
  type: 'boolean',
78
78
  description: 'Initialize an Nx workspace setup in the .nx directory of the current repository.',
79
79
  default: false,
80
- })
81
- .option('force', {
82
- describe: 'Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects.',
83
- type: 'boolean',
84
- default: false,
85
80
  })
86
81
  .option('aiAgents', {
87
82
  type: 'array',
@@ -112,28 +107,13 @@ async function withInitOptions(yargs) {
112
107
  })
113
108
  .option('integrated', {
114
109
  type: 'boolean',
115
- description: 'Migrate to an Nx integrated layout workspace. Only for Angular CLI workspaces and CRA projects.',
116
- default: false,
117
- })
118
- .option('addE2e', {
119
- describe: 'Set up Cypress E2E tests in integrated workspaces. Only for CRA projects.',
120
- type: 'boolean',
110
+ description: 'Migrate to an Nx integrated layout workspace. Only for Angular CLI workspaces.',
121
111
  default: false,
122
112
  })
123
113
  .option('useDotNxInstallation', {
124
114
  type: 'boolean',
125
115
  description: 'Initialize an Nx workspace setup in the .nx directory of the current repository.',
126
116
  default: false,
127
- })
128
- .option('force', {
129
- describe: 'Force the migration to continue and ignore custom webpack setup or uncommitted changes. Only for CRA projects.',
130
- type: 'boolean',
131
- default: false,
132
- })
133
- .option('vite', {
134
- type: 'boolean',
135
- description: 'Use Vite as the bundler. Only for CRA projects.',
136
- default: true,
137
117
  })
138
118
  .option('cacheable', {
139
119
  type: 'string',
@@ -71,7 +71,7 @@ async function runPluginInitGenerator(plugin, repoRoot = workspace_root_1.worksp
71
71
  (0, child_process_1.runNxSync)(command, {
72
72
  stdio: [0, 1, 2],
73
73
  cwd: repoRoot,
74
- windowsHide: false,
74
+ windowsHide: true,
75
75
  packageManagerCommand: pmc,
76
76
  });
77
77
  }
@@ -7,6 +7,6 @@ function setupIntegratedWorkspace() {
7
7
  const pmc = (0, package_manager_1.getPackageManagerCommand)();
8
8
  (0, child_process_1.execSync)(`${pmc.exec} nx g @nx/angular:ng-add`, {
9
9
  stdio: [0, 1, 2],
10
- windowsHide: false,
10
+ windowsHide: true,
11
11
  });
12
12
  }
@@ -105,7 +105,7 @@ async function getLegacyMigrationFunctionIfApplicable(repoRoot, options) {
105
105
  output_1.output.log({ title: '📝 Setting up workspace' });
106
106
  (0, child_process_1.execSync)(`${pmc.exec} ${legacyMigrationCommand}`, {
107
107
  stdio: [0, 1, 2],
108
- windowsHide: false,
108
+ windowsHide: true,
109
109
  });
110
110
  if (useNxCloud) {
111
111
  output_1.output.log({ title: '🛠️ Setting up Nx Cloud' });
@@ -131,7 +131,7 @@ async function installDependencies(repoRoot, pkgInfo, pmc) {
131
131
  json.dependencies = (0, object_sort_1.sortObjectByKeys)(json.dependencies);
132
132
  }
133
133
  (0, fileutils_1.writeJsonFile)(`package.json`, json);
134
- (0, child_process_1.execSync)(pmc.install, { stdio: [0, 1, 2], windowsHide: false });
134
+ (0, child_process_1.execSync)(pmc.install, { stdio: [0, 1, 2], windowsHide: true });
135
135
  }
136
136
  async function resolvePackageVersion(packageName, version) {
137
137
  try {
@@ -7,7 +7,7 @@ function deduceDefaultBase() {
7
7
  try {
8
8
  (0, node_child_process_1.execSync)(`git rev-parse --verify main`, {
9
9
  stdio: ['ignore', 'ignore', 'ignore'],
10
- windowsHide: false,
10
+ windowsHide: true,
11
11
  });
12
12
  return 'main';
13
13
  }
@@ -15,7 +15,7 @@ function deduceDefaultBase() {
15
15
  try {
16
16
  (0, node_child_process_1.execSync)(`git rev-parse --verify dev`, {
17
17
  stdio: ['ignore', 'ignore', 'ignore'],
18
- windowsHide: false,
18
+ windowsHide: true,
19
19
  });
20
20
  return 'dev';
21
21
  }
@@ -23,7 +23,7 @@ function deduceDefaultBase() {
23
23
  try {
24
24
  (0, node_child_process_1.execSync)(`git rev-parse --verify develop`, {
25
25
  stdio: ['ignore', 'ignore', 'ignore'],
26
- windowsHide: false,
26
+ windowsHide: true,
27
27
  });
28
28
  return 'develop';
29
29
  }
@@ -31,7 +31,7 @@ function deduceDefaultBase() {
31
31
  try {
32
32
  (0, node_child_process_1.execSync)(`git rev-parse --verify next`, {
33
33
  stdio: ['ignore', 'ignore', 'ignore'],
34
- windowsHide: false,
34
+ windowsHide: true,
35
35
  });
36
36
  return 'next';
37
37
  }
@@ -39,7 +39,7 @@ function deduceDefaultBase() {
39
39
  try {
40
40
  (0, node_child_process_1.execSync)(`git rev-parse --verify master`, {
41
41
  stdio: ['ignore', 'ignore', 'ignore'],
42
- windowsHide: false,
42
+ windowsHide: true,
43
43
  });
44
44
  return 'master';
45
45
  }
@@ -63,12 +63,12 @@ function generateDotNxSetup(version) {
63
63
  (0, tree_1.flushChanges)(host.root, changes);
64
64
  // Ensure that the dot-nx installation is available.
65
65
  // This is needed when using a global nx with dot-nx, otherwise running any nx command using global command will fail due to missing modules.
66
- (0, child_process_1.execSync)('./nx --version', { stdio: 'ignore' });
66
+ (0, child_process_1.execSync)('./nx --version', { stdio: 'ignore', windowsHide: true });
67
67
  }
68
68
  function normalizeVersionForNxJson(pkg, version) {
69
69
  if (!(0, semver_1.valid)(version)) {
70
70
  version = (0, child_process_1.execSync)(`npm view ${pkg}@${version} version`, {
71
- windowsHide: false,
71
+ windowsHide: true,
72
72
  }).toString();
73
73
  }
74
74
  return version.trimEnd();
@@ -63,7 +63,7 @@ function performInstallation(currentInstallation, nxJson) {
63
63
  cp.execSync('npm i', {
64
64
  cwd: path.dirname(installationPath),
65
65
  stdio: 'inherit',
66
- windowsHide: false,
66
+ windowsHide: true,
67
67
  });
68
68
  }
69
69
  catch (e) {
@@ -8,7 +8,7 @@ export declare function createNxJsonFromTurboJson(turboJson: Record<string, any>
8
8
  export declare function addDepsToPackageJson(repoRoot: string, additionalPackages?: string[]): void;
9
9
  export declare function updateGitIgnore(root: string): void;
10
10
  export declare function runInstall(repoRoot: string, pmc?: PackageManagerCommands): void;
11
- export declare function initCloud(installationSource: 'nx-init' | 'nx-init-angular' | 'nx-init-cra' | 'nx-init-monorepo' | 'nx-init-nest' | 'nx-init-npm-repo' | 'nx-init-turborepo'): Promise<void>;
11
+ export declare function initCloud(installationSource: 'nx-init' | 'nx-init-angular' | 'nx-init-monorepo' | 'nx-init-nest' | 'nx-init-npm-repo' | 'nx-init-turborepo'): Promise<void>;
12
12
  export declare function addVsCodeRecommendedExtensions(repoRoot: string, extensions: string[]): void;
13
13
  export declare function markRootPackageJsonAsNxProjectLegacy(repoRoot: string, cacheableScripts: string[], pmc: PackageManagerCommands): void;
14
14
  export declare function markPackageJsonAsNxProject(packageJsonPath: string): void;
@@ -17,5 +17,4 @@ export declare function printFinalMessage({ learnMoreLink, appendLines, }: {
17
17
  appendLines?: string[];
18
18
  }): void;
19
19
  export declare function isMonorepo(packageJson: PackageJson): boolean;
20
- export declare function isCRA(packageJson: PackageJson): boolean;
21
20
  //# sourceMappingURL=utils.d.ts.map