nx 19.8.0-canary.20240912-b6140d4 → 19.8.0-canary.20240914-dc821ab

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/package.json +12 -12
  2. package/src/command-line/add/add.js +2 -2
  3. package/src/command-line/affected/command-object.js +6 -6
  4. package/src/command-line/deprecated/command-objects.js +3 -3
  5. package/src/command-line/generate/generate.js +2 -1
  6. package/src/command-line/generate/generator-utils.d.ts +2 -1
  7. package/src/command-line/import/command-object.js +3 -3
  8. package/src/command-line/init/init-v2.js +5 -1
  9. package/src/command-line/login/login.js +2 -2
  10. package/src/command-line/logout/logout.js +2 -2
  11. package/src/command-line/migrate/migrate.js +2 -2
  12. package/src/command-line/new/new.js +2 -1
  13. package/src/command-line/release/changelog.js +2 -2
  14. package/src/command-line/release/plan-check.js +2 -2
  15. package/src/command-line/release/plan.js +2 -2
  16. package/src/command-line/release/publish.js +2 -2
  17. package/src/command-line/release/release.js +2 -2
  18. package/src/command-line/release/version.js +2 -1
  19. package/src/command-line/repair/repair.js +2 -2
  20. package/src/command-line/run/command-object.js +3 -3
  21. package/src/command-line/run/run.js +3 -2
  22. package/src/command-line/run-many/command-object.js +2 -2
  23. package/src/command-line/show/command-object.js +3 -3
  24. package/src/command-line/sync/command-object.js +2 -2
  25. package/src/command-line/sync/sync.js +2 -2
  26. package/src/core/graph/main.js +1 -1
  27. package/src/core/graph/styles.css +1 -1
  28. package/src/daemon/client/client.d.ts +2 -1
  29. package/src/daemon/client/client.js +7 -0
  30. package/src/daemon/message-types/task-history.d.ts +9 -3
  31. package/src/daemon/message-types/task-history.js +10 -2
  32. package/src/daemon/server/handle-task-history.d.ts +5 -1
  33. package/src/daemon/server/handle-task-history.js +11 -9
  34. package/src/daemon/server/server.js +5 -2
  35. package/src/native/index.d.ts +1 -0
  36. package/src/native/nx.wasi.cjs +20 -20
  37. package/src/native/nx.wasm32-wasi.wasm +0 -0
  38. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +0 -1
  39. package/src/nx-cloud/utilities/get-cloud-options.d.ts +1 -0
  40. package/src/nx-cloud/utilities/get-cloud-options.js +4 -0
  41. package/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -1
  42. package/src/nx-cloud/utilities/is-workspace-claimed.js +6 -5
  43. package/src/nx-cloud/utilities/onboarding.js +2 -2
  44. package/src/plugins/js/utils/register.js +7 -0
  45. package/src/project-graph/error-types.d.ts +1 -1
  46. package/src/project-graph/error-types.js +19 -5
  47. package/src/tasks-runner/life-cycles/task-history-life-cycle.js +1 -1
  48. package/src/tasks-runner/run-command.js +2 -2
  49. package/src/tasks-runner/task-orchestrator.js +4 -1
  50. package/src/tasks-runner/tasks-schedule.d.ts +3 -0
  51. package/src/tasks-runner/tasks-schedule.js +22 -4
  52. package/src/utils/handle-errors.d.ts +1 -0
  53. package/src/utils/handle-errors.js +71 -0
  54. package/src/utils/nx-cloud-utils.d.ts +0 -1
  55. package/src/utils/nx-cloud-utils.js +0 -10
  56. package/src/utils/params.d.ts +0 -1
  57. package/src/utils/params.js +0 -50
  58. package/src/utils/plugins/plugin-capabilities.js +4 -1
  59. package/src/utils/task-history.d.ts +12 -1
  60. package/src/utils/task-history.js +23 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "19.8.0-canary.20240912-b6140d4",
3
+ "version": "19.8.0-canary.20240914-dc821ab",
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": {
@@ -71,7 +71,7 @@
71
71
  "yargs-parser": "21.1.1",
72
72
  "node-machine-id": "1.1.12",
73
73
  "ora": "5.3.0",
74
- "@nrwl/tao": "19.8.0-canary.20240912-b6140d4"
74
+ "@nrwl/tao": "19.8.0-canary.20240914-dc821ab"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@swc-node/register": "^1.8.0",
@@ -86,16 +86,16 @@
86
86
  }
87
87
  },
88
88
  "optionalDependencies": {
89
- "@nx/nx-darwin-x64": "19.8.0-canary.20240912-b6140d4",
90
- "@nx/nx-darwin-arm64": "19.8.0-canary.20240912-b6140d4",
91
- "@nx/nx-linux-x64-gnu": "19.8.0-canary.20240912-b6140d4",
92
- "@nx/nx-linux-x64-musl": "19.8.0-canary.20240912-b6140d4",
93
- "@nx/nx-win32-x64-msvc": "19.8.0-canary.20240912-b6140d4",
94
- "@nx/nx-linux-arm64-gnu": "19.8.0-canary.20240912-b6140d4",
95
- "@nx/nx-linux-arm64-musl": "19.8.0-canary.20240912-b6140d4",
96
- "@nx/nx-linux-arm-gnueabihf": "19.8.0-canary.20240912-b6140d4",
97
- "@nx/nx-win32-arm64-msvc": "19.8.0-canary.20240912-b6140d4",
98
- "@nx/nx-freebsd-x64": "19.8.0-canary.20240912-b6140d4"
89
+ "@nx/nx-darwin-x64": "19.8.0-canary.20240914-dc821ab",
90
+ "@nx/nx-darwin-arm64": "19.8.0-canary.20240914-dc821ab",
91
+ "@nx/nx-linux-x64-gnu": "19.8.0-canary.20240914-dc821ab",
92
+ "@nx/nx-linux-x64-musl": "19.8.0-canary.20240914-dc821ab",
93
+ "@nx/nx-win32-x64-msvc": "19.8.0-canary.20240914-dc821ab",
94
+ "@nx/nx-linux-arm64-gnu": "19.8.0-canary.20240914-dc821ab",
95
+ "@nx/nx-linux-arm64-musl": "19.8.0-canary.20240914-dc821ab",
96
+ "@nx/nx-linux-arm-gnueabihf": "19.8.0-canary.20240914-dc821ab",
97
+ "@nx/nx-win32-arm64-msvc": "19.8.0-canary.20240914-dc821ab",
98
+ "@nx/nx-freebsd-x64": "19.8.0-canary.20240914-dc821ab"
99
99
  },
100
100
  "nx-migrations": {
101
101
  "migrations": "./migrations.json",
@@ -12,13 +12,13 @@ const fileutils_1 = require("../../utils/fileutils");
12
12
  const logger_1 = require("../../utils/logger");
13
13
  const output_1 = require("../../utils/output");
14
14
  const package_manager_1 = require("../../utils/package-manager");
15
- const params_1 = require("../../utils/params");
15
+ const handle_errors_1 = require("../../utils/handle-errors");
16
16
  const plugins_1 = require("../../utils/plugins");
17
17
  const versions_1 = require("../../utils/versions");
18
18
  const workspace_root_1 = require("../../utils/workspace-root");
19
19
  const add_nx_scripts_1 = require("../init/implementation/dot-nx/add-nx-scripts");
20
20
  function addHandler(options) {
21
- return (0, params_1.handleErrors)(options.verbose, async () => {
21
+ return (0, handle_errors_1.handleErrors)(options.verbose, async () => {
22
22
  output_1.output.addNewline();
23
23
  const [pkgName, version] = parsePackageSpecifier(options.packageSpecifier);
24
24
  const nxJson = (0, nx_json_1.readNxJson)();
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsAffectedE2ECommand = exports.yargsAffectedLintCommand = exports.yargsAffectedBuildCommand = exports.yargsAffectedTestCommand = exports.yargsAffectedCommand = void 0;
4
4
  const documentation_1 = require("../yargs-utils/documentation");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsAffectedCommand = {
8
8
  command: 'affected',
9
9
  describe: 'Run target for affected projects.',
@@ -18,7 +18,7 @@ exports.yargsAffectedCommand = {
18
18
  }
19
19
  }), 'affected'),
20
20
  handler: async (args) => {
21
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
21
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
22
22
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', (0, shared_options_1.withOverrides)(args));
23
23
  });
24
24
  process.exit(exitCode);
@@ -29,7 +29,7 @@ exports.yargsAffectedTestCommand = {
29
29
  describe: false,
30
30
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
31
31
  handler: async (args) => {
32
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
32
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
33
33
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
34
34
  ...(0, shared_options_1.withOverrides)(args),
35
35
  target: 'test',
@@ -43,7 +43,7 @@ exports.yargsAffectedBuildCommand = {
43
43
  describe: false,
44
44
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
45
45
  handler: async (args) => {
46
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
46
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
47
47
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
48
48
  ...(0, shared_options_1.withOverrides)(args),
49
49
  target: 'build',
@@ -57,7 +57,7 @@ exports.yargsAffectedLintCommand = {
57
57
  describe: false,
58
58
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
59
59
  handler: async (args) => {
60
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
60
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
61
61
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
62
62
  ...(0, shared_options_1.withOverrides)(args),
63
63
  target: 'lint',
@@ -71,7 +71,7 @@ exports.yargsAffectedE2ECommand = {
71
71
  describe: false,
72
72
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
73
73
  handler: async (args) => {
74
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
74
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
75
75
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
76
76
  ...(0, shared_options_1.withOverrides)(args),
77
77
  target: 'e2e',
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsPrintAffectedCommand = exports.yargsAffectedGraphCommand = void 0;
4
- const params_1 = require("../../utils/params");
4
+ const handle_errors_1 = require("../../utils/handle-errors");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
6
  const command_object_1 = require("../graph/command-object");
7
7
  const affectedGraphDeprecationMessage = 'Use `nx graph --affected`, or `nx affected --graph` instead depending on which best suits your use case. The `affected:graph` command has been removed in Nx 19.';
@@ -15,7 +15,7 @@ exports.yargsAffectedGraphCommand = {
15
15
  aliases: ['affected:dep-graph'],
16
16
  builder: (yargs) => (0, shared_options_1.withAffectedOptions)((0, command_object_1.withGraphOptions)(yargs)),
17
17
  handler: async (args) => {
18
- const exitCode = await (0, params_1.handleErrors)(false, () => {
18
+ const exitCode = await (0, handle_errors_1.handleErrors)(false, () => {
19
19
  throw new Error(affectedGraphDeprecationMessage);
20
20
  });
21
21
  process.exit(exitCode);
@@ -39,7 +39,7 @@ exports.yargsPrintAffectedCommand = {
39
39
  describe: 'Select the type of projects to be returned (e.g., --type=app).',
40
40
  }),
41
41
  handler: async (args) => {
42
- const exitCode = await (0, params_1.handleErrors)(false, () => {
42
+ const exitCode = await (0, handle_errors_1.handleErrors)(false, () => {
43
43
  throw new Error(printAffectedDeprecationMessage);
44
44
  });
45
45
  process.exit(exitCode);
@@ -12,6 +12,7 @@ const tree_1 = require("../../generators/tree");
12
12
  const project_graph_1 = require("../../project-graph/project-graph");
13
13
  const logger_1 = require("../../utils/logger");
14
14
  const params_1 = require("../../utils/params");
15
+ const handle_errors_1 = require("../../utils/handle-errors");
15
16
  const local_plugins_1 = require("../../utils/plugins/local-plugins");
16
17
  const print_help_1 = require("../../utils/print-help");
17
18
  const workspace_root_1 = require("../../utils/workspace-root");
@@ -206,7 +207,7 @@ function printGenHelp(opts, schema, normalizedGeneratorName, aliases) {
206
207
  });
207
208
  }
208
209
  async function generate(cwd, args) {
209
- return (0, params_1.handleErrors)(args.verbose, async () => {
210
+ return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
210
211
  const nxJsonConfiguration = (0, configuration_1.readNxJson)();
211
212
  const projectGraph = await (0, project_graph_1.createProjectGraphAsync)();
212
213
  const projectsConfigurations = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
@@ -1,6 +1,6 @@
1
1
  import { Generator, GeneratorsJson, GeneratorsJsonEntry } from '../../config/misc-interfaces';
2
2
  import { ProjectConfiguration } from '../../config/workspace-json-project-json';
3
- export declare function getGeneratorInformation(collectionName: string, generatorName: string, root: string | null, projects: Record<string, ProjectConfiguration>): {
3
+ export type GeneratorInformation = {
4
4
  resolvedCollectionName: string;
5
5
  normalizedGeneratorName: string;
6
6
  schema: any;
@@ -9,6 +9,7 @@ export declare function getGeneratorInformation(collectionName: string, generato
9
9
  isNxGenerator: boolean;
10
10
  generatorConfiguration: GeneratorsJsonEntry;
11
11
  };
12
+ export declare function getGeneratorInformation(collectionName: string, generatorName: string, root: string | null, projects: Record<string, ProjectConfiguration>): GeneratorInformation;
12
13
  export declare function readGeneratorsJson(collectionName: string, generator: string, root: string | null, projects: Record<string, ProjectConfiguration>): {
13
14
  generatorsFilePath: string;
14
15
  generatorsJson: GeneratorsJson;
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsImportCommand = void 0;
4
4
  const documentation_1 = require("../yargs-utils/documentation");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsImportCommand = {
8
8
  command: 'import [sourceRepository] [destinationDirectory]',
9
- describe: false,
9
+ describe: 'Import code and git history from another repository into this repository.',
10
10
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withVerbose)(yargs
11
11
  .positional('sourceRepository', {
12
12
  type: 'string',
@@ -36,7 +36,7 @@ exports.yargsImportCommand = {
36
36
  default: true,
37
37
  })), 'import'),
38
38
  handler: async (args) => {
39
- const exitCode = await (0, params_1.handleErrors)(args.verbose, async () => {
39
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose, async () => {
40
40
  return (await Promise.resolve().then(() => require('./import'))).importHandler(args);
41
41
  });
42
42
  process.exit(exitCode);
@@ -155,7 +155,11 @@ async function detectPlugins(nxJson, interactive) {
155
155
  }
156
156
  }
157
157
  }
158
- if ((0, fs_1.existsSync)('gradlew') || (0, fs_1.existsSync)('gradlew.bat')) {
158
+ let gradlewFiles = ['gradlew', 'gradlew.bat'].concat(await (0, workspace_context_1.globWithWorkspaceContext)(process.cwd(), [
159
+ '**/gradlew',
160
+ '**/gradlew.bat',
161
+ ]));
162
+ if (gradlewFiles.some((f) => (0, fs_1.existsSync)(f))) {
159
163
  detectedPlugins.add('@nx/gradle');
160
164
  }
161
165
  // Remove existing plugins
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loginHandler = loginHandler;
4
4
  const update_manager_1 = require("../../nx-cloud/update-manager");
5
5
  const get_cloud_options_1 = require("../../nx-cloud/utilities/get-cloud-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  function loginHandler(args) {
8
8
  if (args.nxCloudUrl) {
9
9
  process.env.NX_CLOUD_API = args.nxCloudUrl;
10
10
  }
11
- return (0, params_1.handleErrors)(args.verbose, async () => {
11
+ return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
12
12
  const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
13
13
  .nxCloudClient;
14
14
  await nxCloudClient.commands.login();
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logoutHandler = logoutHandler;
4
4
  const update_manager_1 = require("../../nx-cloud/update-manager");
5
5
  const get_cloud_options_1 = require("../../nx-cloud/utilities/get-cloud-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  function logoutHandler(args) {
8
- return (0, params_1.handleErrors)(args.verbose, async () => {
8
+ return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
9
9
  const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
10
10
  .nxCloudClient;
11
11
  await nxCloudClient.commands.logout();
@@ -18,7 +18,7 @@ const logger_1 = require("../../utils/logger");
18
18
  const git_utils_1 = require("../../utils/git-utils");
19
19
  const package_json_1 = require("../../utils/package-json");
20
20
  const package_manager_1 = require("../../utils/package-manager");
21
- const params_1 = require("../../utils/params");
21
+ const handle_errors_1 = require("../../utils/handle-errors");
22
22
  const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
23
23
  const output_1 = require("../../utils/output");
24
24
  const fs_1 = require("fs");
@@ -1041,7 +1041,7 @@ async function runNxMigration(root, collectionPath, collection, name) {
1041
1041
  }
1042
1042
  async function migrate(root, args, rawArgs) {
1043
1043
  await client_1.daemonClient.stop();
1044
- return (0, params_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true', async () => {
1044
+ return (0, handle_errors_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true', async () => {
1045
1045
  const opts = await parseMigrationsOptions(args);
1046
1046
  if (opts.type === 'generateMigrations') {
1047
1047
  await generateMigrationsJsonAndUpdatePackageJson(root, opts);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.newWorkspace = newWorkspace;
4
4
  const tree_1 = require("../../generators/tree");
5
5
  const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
6
7
  const generator_utils_1 = require("../generate/generator-utils");
7
8
  function removeSpecialFlags(generatorOptions) {
8
9
  delete generatorOptions.interactive;
@@ -12,7 +13,7 @@ function removeSpecialFlags(generatorOptions) {
12
13
  delete generatorOptions['$0'];
13
14
  }
14
15
  async function newWorkspace(cwd, args) {
15
- return (0, params_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true' || args.verbose, async () => {
16
+ return (0, handle_errors_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true' || args.verbose, async () => {
16
17
  const isInteractive = args.interactive;
17
18
  const { normalizedGeneratorName, schema, implementationFactory } = (0, generator_utils_1.getGeneratorInformation)('@nx/workspace/generators.json', 'new', null, {});
18
19
  removeSpecialFlags(args);
@@ -16,7 +16,7 @@ const project_graph_1 = require("../../project-graph/project-graph");
16
16
  const utils_1 = require("../../tasks-runner/utils");
17
17
  const is_ci_1 = require("../../utils/is-ci");
18
18
  const output_1 = require("../../utils/output");
19
- const params_1 = require("../../utils/params");
19
+ const handle_errors_1 = require("../../utils/handle-errors");
20
20
  const path_1 = require("../../utils/path");
21
21
  const workspace_root_1 = require("../../utils/workspace-root");
22
22
  const config_1 = require("./config/config");
@@ -32,7 +32,7 @@ const print_config_1 = require("./utils/print-config");
32
32
  const resolve_changelog_renderer_1 = require("./utils/resolve-changelog-renderer");
33
33
  const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
34
34
  const shared_1 = require("./utils/shared");
35
- const releaseChangelogCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args));
35
+ const releaseChangelogCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
36
36
  exports.releaseChangelogCLIHandler = releaseChangelogCLIHandler;
37
37
  function createAPI(overrideReleaseConfig) {
38
38
  /**
@@ -8,14 +8,14 @@ const project_graph_1 = require("../../project-graph/project-graph");
8
8
  const all_file_data_1 = require("../../utils/all-file-data");
9
9
  const command_line_utils_1 = require("../../utils/command-line-utils");
10
10
  const output_1 = require("../../utils/output");
11
- const params_1 = require("../../utils/params");
11
+ const handle_errors_1 = require("../../utils/handle-errors");
12
12
  const config_1 = require("./config/config");
13
13
  const deep_merge_json_1 = require("./config/deep-merge-json");
14
14
  const filter_release_groups_1 = require("./config/filter-release-groups");
15
15
  const version_plans_1 = require("./config/version-plans");
16
16
  const get_touched_projects_for_group_1 = require("./utils/get-touched-projects-for-group");
17
17
  const print_config_1 = require("./utils/print-config");
18
- const releasePlanCheckCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args));
18
+ const releasePlanCheckCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
19
19
  exports.releasePlanCheckCLIHandler = releasePlanCheckCLIHandler;
20
20
  function createAPI(overrideReleaseConfig) {
21
21
  return async function releasePlanCheck(args) {
@@ -13,7 +13,7 @@ const project_graph_1 = require("../../project-graph/project-graph");
13
13
  const all_file_data_1 = require("../../utils/all-file-data");
14
14
  const command_line_utils_1 = require("../../utils/command-line-utils");
15
15
  const output_1 = require("../../utils/output");
16
- const params_1 = require("../../utils/params");
16
+ const handle_errors_1 = require("../../utils/handle-errors");
17
17
  const config_1 = require("./config/config");
18
18
  const deep_merge_json_1 = require("./config/deep-merge-json");
19
19
  const filter_release_groups_1 = require("./config/filter-release-groups");
@@ -23,7 +23,7 @@ const get_touched_projects_for_group_1 = require("./utils/get-touched-projects-f
23
23
  const launch_editor_1 = require("./utils/launch-editor");
24
24
  const print_changes_1 = require("./utils/print-changes");
25
25
  const print_config_1 = require("./utils/print-config");
26
- const releasePlanCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args));
26
+ const releasePlanCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
27
27
  exports.releasePlanCLIHandler = releasePlanCLIHandler;
28
28
  function createAPI(overrideReleaseConfig) {
29
29
  return async function releasePlan(args) {
@@ -8,14 +8,14 @@ const project_graph_1 = require("../../project-graph/project-graph");
8
8
  const run_command_1 = require("../../tasks-runner/run-command");
9
9
  const command_line_utils_1 = require("../../utils/command-line-utils");
10
10
  const output_1 = require("../../utils/output");
11
- const params_1 = require("../../utils/params");
11
+ const handle_errors_1 = require("../../utils/handle-errors");
12
12
  const project_graph_utils_1 = require("../../utils/project-graph-utils");
13
13
  const graph_1 = require("../graph/graph");
14
14
  const config_1 = require("./config/config");
15
15
  const deep_merge_json_1 = require("./config/deep-merge-json");
16
16
  const filter_release_groups_1 = require("./config/filter-release-groups");
17
17
  const print_config_1 = require("./utils/print-config");
18
- const releasePublishCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args, true));
18
+ const releasePublishCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args, true));
19
19
  exports.releasePublishCLIHandler = releasePublishCLIHandler;
20
20
  function createAPI(overrideReleaseConfig) {
21
21
  /**
@@ -8,7 +8,7 @@ const nx_json_1 = require("../../config/nx-json");
8
8
  const file_map_utils_1 = require("../../project-graph/file-map-utils");
9
9
  const project_graph_1 = require("../../project-graph/project-graph");
10
10
  const output_1 = require("../../utils/output");
11
- const params_1 = require("../../utils/params");
11
+ const handle_errors_1 = require("../../utils/handle-errors");
12
12
  const changelog_1 = require("./changelog");
13
13
  const config_1 = require("./config/config");
14
14
  const deep_merge_json_1 = require("./config/deep-merge-json");
@@ -21,7 +21,7 @@ const print_config_1 = require("./utils/print-config");
21
21
  const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
22
22
  const shared_1 = require("./utils/shared");
23
23
  const version_1 = require("./version");
24
- const releaseCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args));
24
+ const releaseCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
25
25
  exports.releaseCLIHandler = releaseCLIHandler;
26
26
  function createAPI(overrideReleaseConfig) {
27
27
  const releaseVersion = (0, version_1.createAPI)(overrideReleaseConfig);
@@ -26,12 +26,13 @@ const print_changes_1 = require("./utils/print-changes");
26
26
  const print_config_1 = require("./utils/print-config");
27
27
  const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
28
28
  const shared_1 = require("./utils/shared");
29
+ const handle_errors_1 = require("../../utils/handle-errors");
29
30
  const LARGE_BUFFER = 1024 * 1000000;
30
31
  // Reexport some utils for use in plugin release-version generator implementations
31
32
  var semver_1 = require("./utils/semver");
32
33
  Object.defineProperty(exports, "deriveNewSemverVersion", { enumerable: true, get: function () { return semver_1.deriveNewSemverVersion; } });
33
34
  exports.validReleaseVersionPrefixes = ['auto', '', '~', '^', '='];
34
- const releaseVersionCLIHandler = (args) => (0, params_1.handleErrors)(args.verbose, () => createAPI({})(args));
35
+ const releaseVersionCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
35
36
  exports.releaseVersionCLIHandler = releaseVersionCLIHandler;
36
37
  function createAPI(overrideReleaseConfig) {
37
38
  /**
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.repair = repair;
4
- const params_1 = require("../../utils/params");
4
+ const handle_errors_1 = require("../../utils/handle-errors");
5
5
  const migrationsJson = require("../../../migrations.json");
6
6
  const migrate_1 = require("../migrate/migrate");
7
7
  const output_1 = require("../../utils/output");
8
8
  async function repair(args, extraMigrations = []) {
9
- return (0, params_1.handleErrors)(args.verbose, async () => {
9
+ return (0, handle_errors_1.handleErrors)(args.verbose, async () => {
10
10
  const nxMigrations = Object.entries(migrationsJson.generators).reduce((agg, [name, migration]) => {
11
11
  const skip = migration['x-repair-skip'];
12
12
  if (!skip) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsNxInfixCommand = exports.yargsRunCommand = void 0;
4
4
  const yargs_1 = require("yargs");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsRunCommand = {
8
8
  command: 'run [project][:target][:configuration] [_..]',
9
9
  describe: `Run a target for a project
@@ -15,7 +15,7 @@ exports.yargsRunCommand = {
15
15
  You can skip the use of Nx cache by using the --skip-nx-cache option.`,
16
16
  builder: (yargs) => (0, shared_options_1.withRunOneOptions)((0, shared_options_1.withBatch)(yargs)),
17
17
  handler: async (args) => {
18
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
18
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
19
19
  await Promise.resolve().then(() => require('./run-one')).then((m) => m.runOne(process.cwd(), (0, shared_options_1.withOverrides)(args)));
20
20
  });
21
21
  process.exit(exitCode);
@@ -29,7 +29,7 @@ exports.yargsNxInfixCommand = {
29
29
  command: '$0 <target> [project] [_..]',
30
30
  describe: 'Run a target for a project.',
31
31
  handler: async (args) => {
32
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
32
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
33
33
  // Yargs parses <target> as 'undefined' if running just 'nx'
34
34
  if (!args.target || args.target === 'undefined') {
35
35
  (0, yargs_1.showHelp)();
@@ -7,6 +7,7 @@ exports.printTargetRunHelp = printTargetRunHelp;
7
7
  exports.run = run;
8
8
  const npm_run_path_1 = require("npm-run-path");
9
9
  const params_1 = require("../../utils/params");
10
+ const handle_errors_1 = require("../../utils/handle-errors");
10
11
  const print_help_1 = require("../../utils/print-help");
11
12
  const path_1 = require("path");
12
13
  const serialize_overrides_into_command_line_1 = require("../../utils/serialize-overrides-into-command-line");
@@ -163,14 +164,14 @@ async function runExecutor(targetDescription, overrides, context) {
163
164
  }
164
165
  function printTargetRunHelp(targetDescription, root) {
165
166
  const projectGraph = (0, project_graph_1.readCachedProjectGraph)();
166
- return (0, params_1.handleErrors)(false, async () => {
167
+ return (0, handle_errors_1.handleErrors)(false, async () => {
167
168
  const projectsConfigurations = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
168
169
  await printTargetRunHelpInternal(targetDescription, root, projectsConfigurations);
169
170
  });
170
171
  }
171
172
  function run(cwd, root, targetDescription, overrides, isVerbose, taskGraph) {
172
173
  const projectGraph = (0, project_graph_1.readCachedProjectGraph)();
173
- return (0, params_1.handleErrors)(isVerbose, async () => {
174
+ return (0, handle_errors_1.handleErrors)(isVerbose, async () => {
174
175
  const projectsConfigurations = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
175
176
  return iteratorToProcessStatusCode(await runExecutorInternal(targetDescription, overrides, root, cwd, projectsConfigurations, (0, configuration_1.readNxJson)(), projectGraph, taskGraph, isVerbose));
176
177
  });
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsRunManyCommand = void 0;
4
4
  const documentation_1 = require("../yargs-utils/documentation");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsRunManyCommand = {
8
8
  command: 'run-many',
9
9
  describe: 'Run target for multiple listed projects.',
10
10
  builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withRunManyOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs)))), 'run-many'),
11
11
  handler: async (args) => {
12
- const exitCode = await (0, params_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
12
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
13
13
  await Promise.resolve().then(() => require('./run-many')).then((m) => m.runMany((0, shared_options_1.withOverrides)(args)));
14
14
  });
15
15
  process.exit(exitCode);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsShowCommand = void 0;
4
4
  const yargs_1 = require("yargs");
5
5
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const params_1 = require("../../utils/params");
6
+ const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsShowCommand = {
8
8
  command: 'show',
9
9
  describe: 'Show information about the workspace (e.g., list of projects).',
@@ -65,7 +65,7 @@ const showProjectsCommand = {
65
65
  .example('$0 show projects --type app --affected', 'Show affected apps in the workspace')
66
66
  .example('$0 show projects --affected --exclude=*-e2e', 'Show affected projects in the workspace, excluding end-to-end projects'),
67
67
  handler: async (args) => {
68
- const exitCode = await (0, params_1.handleErrors)(args.verbose, async () => {
68
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose, async () => {
69
69
  const { showProjectsHandler } = await Promise.resolve().then(() => require('./projects'));
70
70
  await showProjectsHandler(args);
71
71
  });
@@ -106,7 +106,7 @@ const showProjectCommand = {
106
106
  .example('$0 show project my-app', 'View project information for my-app in JSON format')
107
107
  .example('$0 show project my-app --web', 'View project information for my-app in the browser'),
108
108
  handler: async (args) => {
109
- const exitCode = await (0, params_1.handleErrors)(args.verbose, async () => {
109
+ const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose, async () => {
110
110
  const { showProjectHandler } = await Promise.resolve().then(() => require('./project'));
111
111
  await showProjectHandler(args);
112
112
  });
@@ -4,7 +4,7 @@ exports.yargsSyncCheckCommand = exports.yargsSyncCommand = void 0;
4
4
  const shared_options_1 = require("../yargs-utils/shared-options");
5
5
  exports.yargsSyncCommand = {
6
6
  command: 'sync',
7
- describe: false,
7
+ describe: 'Sync the workspace files by running all the sync generators.',
8
8
  builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
9
9
  handler: async (args) => {
10
10
  process.exit(await Promise.resolve().then(() => require('./sync')).then((m) => m.syncHandler(args)));
@@ -12,7 +12,7 @@ exports.yargsSyncCommand = {
12
12
  };
13
13
  exports.yargsSyncCheckCommand = {
14
14
  command: 'sync:check',
15
- describe: false,
15
+ describe: 'Check that no changes are required after running all sync generators.',
16
16
  builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
17
17
  handler: async (args) => {
18
18
  process.exit(await Promise.resolve().then(() => require('./sync')).then((m) => m.syncHandler({ ...args, check: true })));
@@ -5,11 +5,11 @@ const ora = require("ora");
5
5
  const nx_json_1 = require("../../config/nx-json");
6
6
  const project_graph_1 = require("../../project-graph/project-graph");
7
7
  const output_1 = require("../../utils/output");
8
- const params_1 = require("../../utils/params");
8
+ const handle_errors_1 = require("../../utils/handle-errors");
9
9
  const sync_generators_1 = require("../../utils/sync-generators");
10
10
  const chalk = require("chalk");
11
11
  function syncHandler(options) {
12
- return (0, params_1.handleErrors)(options.verbose, async () => {
12
+ return (0, handle_errors_1.handleErrors)(options.verbose, async () => {
13
13
  const projectGraph = await (0, project_graph_1.createProjectGraphAsync)();
14
14
  const nxJson = (0, nx_json_1.readNxJson)();
15
15
  const syncGenerators = await (0, sync_generators_1.collectAllRegisteredSyncGenerators)(projectGraph, nxJson);